Segment Integration - Analytics.js Compatibility Mode #108
mbellifa
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's your feature/idea?
Background
Let's say an organization uses analytics.js (provided by Segment) on their main site of company.com and uses GitBook at docs.company.com. If a user starts their journey on docs.company.com then events will be tracked on Segment with a certain anonymous ID, however, once they move to company.com they will be given a new ID which breaks the session stitching. The other direction works however, GitBook's integration will read the cookie from company.com and use that anonymous ID if it exists which is great.
I believe this happens because the GitBook integration uses a cookie called
__session
attached to the.gitbook.com
domain to store its anonymous ID by default. Whereas Analytics.js usesajs_anonymous_id
attached to.company.com
Request
It'd be great if there was some kind of Analytics.js Compatibility checkbox in the Segment integration that would cause the following behavior:
ajs_anonymous_id
is defined, if not:__session
cookie toajs_anonymous_id
on the parent domain (.company.com
) to allow analytics.js to pick it up if the user moves to company.com (or another subdomain)What's your desired outcome?
The goal is for analytics.js to be able to pick up on an anonymous ID generated by GitBook. This allows a default setup of Segment to keep the session stitched between docs and the main website.
What's the impact of this for you?
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions