Skip to content

Commit a7815f0

Browse files
author
markzegarelli
authored
Merge pull request #1625 from segmentio/ajs2-updates
post release ajs2 updates
2 parents fd50086 + b6ec21b commit a7815f0

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

src/connections/sources/catalog/libraries/website/javascript/index.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,3 +698,33 @@ Analytics.js uses `localstorage` cookies if you have retries enabled, to keep tr
698698
For more information, visit the [Segment localstorage-retry library](https://github.com/segmentio/localstorage-retry).
699699

700700
You can set the `debug` cookie to `analytics.js` to log debug messages from Analytics.js to the console.
701+
702+
## Open source libraries
703+
704+
Analytics.js 2.0 includes the following open source components:
705+
706+
**uuid v2.0.0** ([https://github.com/lukeed/uuid](https://github.com/lukeed/uuid))
707+
Copyright Luke Edwards <[[email protected]](mailto:[email protected])> ([lukeed.com](https://lukeed.com/))
708+
License: MIT License, available here: [https://github.com/lukeed/uuid/blob/master/license](https://github.com/lukeed/uuid/blob/master/license)
709+
710+
**component-url v0.2.1** ([https://github.com/component/url](https://github.com/component/url))
711+
Copyright (c) 2014 Component
712+
License: MIT License, available here: [https://github.com/component/url/blob/master/Readme.md](https://github.com/component/url/blob/master/Readme.md)
713+
714+
**dset v2.0.1** ([https://github.com/lukeed/dset](https://github.com/lukeed/dset))
715+
Copyright (c) Luke Edwards <[[email protected]](mailto:[email protected])> ([lukeed.com](https://lukeed.com/))
716+
License: MIT License, available here: [https://github.com/lukeed/dset/blob/master/license](https://github.com/lukeed/dset/blob/master/license)
717+
718+
**js-cookie v2.2.1**
719+
Copyright (c) 2018 Copyright 2018 Klaus Hartl, Fagner Brack, GitHub Contributors
720+
  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)
721+
722+
**md5 v2.3.0** ([https://github.com/pvorb/node-md5](https://github.com/pvorb/node-md5))
723+
Copyright (c) 2011-2012, Paul Vorbach.
724+
Copyright (c) 2009, Jeff Mott.
725+
License: BSD-3-Clause “New” or “Revised” License, available at:
726+
[https://github.com/pvorb/node-md5/blob/master/LICENSE](https://github.com/pvorb/node-md5/blob/master/LICENSE)
727+
728+
**unfetch v4.1.0** ([https://github.com/developit/unfetch](https://github.com/developit/unfetch))
729+
Copyright (c) 2017 Jason Miller
730+
License: MIT License, available at: [https://github.com/developit/unfetch/blob/master/LICENSE.md](https://github.com/developit/unfetch/blob/master/LICENSE.md)

src/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,19 @@ Analytics.js sources will upgrade to Analytics.js 2.0 on the date below, accordi
3131
3232
## Revert to Analytics.js Classic
3333

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:
47+
- `https://cdn.segment.com/v1/projects/<WRITE_KEY>/settings`
48+
- `https://cdn.segment.com/analytics-next/bundles/*`
49+
- `https://cdn.segment.com/next-integrations/integrations/*`

0 commit comments

Comments
 (0)