You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
License: MIT License, available here: [https://github.com/js-cookie/js-cookie/blob/master/LICENSE](https://github.com/js-cookie/js-cookie/blob/master/LICENSE)
License: MIT License, available at: [https://github.com/developit/unfetch/blob/master/LICENSE.md](https://github.com/developit/unfetch/blob/master/LICENSE.md)
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,4 +31,19 @@ Analytics.js sources will upgrade to Analytics.js 2.0 on the date below, accordi
31
31
32
32
## Revert to Analytics.js Classic
33
33
34
-
Once a source moves to Analytics.js 2.0, you can follow the steps above in [Manual migration](#manual-migration) back to roll back to Analytics.js Classic.
34
+
Once a source moves to Analytics.js 2.0, you can follow the steps above in [Manual migration](#manual-migration) back to roll back to Analytics.js Classic.
35
+
36
+
## Cases that require additional intervention
37
+
38
+
There are two cases where upgrading to Analytics.js 2.0 requires manual effort beyond enabling the Analytics.js 2.0 toggle.
39
+
40
+
### When using in-domain instrumentation CDN aliasing
41
+
42
+
If the source you intend to upgrade uses the in-domain instrumentation as well as a custom "Alias for analytics.js", then you should update the AJS snippet to the latest version (4.13.2 or higher) before you toggle on Analytics.js 2.0.
43
+
44
+
### When using a strict content security policy on the page
45
+
46
+
Analytics.js 2.0 asynchronously loads different pieces of the library as needed. If the source you're upgrading uses a strict Content Security Policy (CSP) that allows Javascript to be downloaded from specific locations, then you need to update the CSP to account for all the pieces used for Analytics.js 2.0. Therefore, beyond allowing the main analytics.min.js script, you should allow the following paths in your CSP:
0 commit comments