Question
What first-party cookies does Segment drop for analytics.js to function properly?
Product
Twilio Segment
Environment
Segment Console
Answer
To manage identity and ensure analytics.js functions correctly, Segment drops three core first-party cookies as soon as your site loads:
- ajs_anonymous_id: Automatically tracks anonymous visitors.
-
ajs_user_id: Tracks the logged-in user (created via an
identify()call). -
ajs_group_id: Tracks account/company relationships (created via a
group()call).
To keep this information active even if a user refreshes the page, Segment also saves these IDs, along with any
ajs_user_traits and ajs_group_properties, in the browser's local storage.
Additional Information
For complete technical details and cookie expiry timelines, please refer to our Segment Cookie Documentation.