Skip to content

Commit f3c51b9

Browse files
authored
Merge pull request #211 from segmentio/repo-sync
repo sync
2 parents 3d76e26 + b5bf6f6 commit f3c51b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ If the source you intend to upgrade uses the in-domain instrumentation as well a
5050

5151
### Relying on Analytics.js Classic's `ajs_anonymous_id` cookie format
5252

53-
Analytics.js 2.0 removes inbuilt quotes from cookie values, resulting in a different format for the `ajs_anonymous_id` value when compared to Analytics.js Classic. Though you can retrieve cookie values with [standard supported functions](/docs/connections/sources/catalog/libraries/website/javascript/identity/#retrieve-the-anonymous-id), you'll need to configure your environment to accept the new format using the `utility` [plugin](/docs/connections/sources/catalog/libraries/website/javascript/index/#example-plugins) if your implementation relies on accessing the cookie value directly.
53+
Analytics.js 2.0 removes inbuilt quotes from cookie values, resulting in a different format for the `ajs_anonymous_id` value when compared to Analytics.js Classic. Though you can retrieve cookie values with [standard supported functions](/docs/connections/sources/catalog/libraries/website/javascript/identity/#retrieve-the-anonymous-id), you'll need to configure your environment to accept the new format if your implementation relies on accessing the cookie value directly.
54+
55+
If you configured different sources for different subdomains of your website, switch them to Analytics 2.0 at the same time. Switching them at the same time ensures that subdomain tracking won't break. In cases when you need to gradually update to Analytics 2.0, the `utility` [plugin](/docs/connections/sources/catalog/libraries/website/javascript/index/#example-plugins) can help match the `ajs_anonymous_id` cookie format and ensure that users are consistently identified across your subdomains.
5456

5557
### Using a strict content security policy on the page
5658

0 commit comments

Comments
 (0)