What is the ajs_user_id cookie?
ajs_user_id is an HTTP cookie created by Analytics.js, the JavaScript library from Segment, a customer data platform used by many websites and apps to collect and route user event data to various analytics and marketing tools.
The cookie typically appears after a visitor is explicitly identified by the site — for example after login, form submission, or another action that triggers the analytics.identify() call in Segment's library. It is not set automatically for fully anonymous visitors, only once the site associates a session with a user identifier.
What data it stores
The cookie stores the user ID assigned by the site through Segment's identify call — usually an internal ID the application uses to recognize that account, not necessarily an email address or other directly readable data.
The value is sent to the site's own domain and, indirectly, to Segment's infrastructure whenever the Analytics.js library sends events to the Segment API, so they can be tied to that user's profile.
What it is used for
Its main role is identity continuity: it lets Segment (and, by extension, the analytics or marketing tools connected through Segment) recognize the same user across different sessions and visits, even if other session cookies expire.
For the site owner, this means more coherent behavioral reporting — for example, unifying a logged-in user's actions across multiple devices or sessions within product analytics.
Does it require consent?
Under CookieFix's classification, ajs_user_id falls into the statistics (analytics) category. Because it links browsing behavior to a user identifier, it is treated as an analytics cookie and requires the visitor's prior consent under the ePrivacy Directive (2002/58/EC, transposed in Romania via Law 506/2004) and GDPR, since it involves processing personal data.
Site owners should declare this cookie in their cookie policy, classify it correctly in the consent banner, and make sure the Segment script does not run before consent is obtained for the statistics category.
How to block or delete ajs_user_id
A visitor can delete or block this cookie through their browser's per-site cookie settings, or by using tracker-blocking extensions; blocking it does not affect site functionality, only analytics data collection.
For site owners using a consent management platform like CookieFix, the Segment script (Analytics.js) can be automatically blocked until the visitor accepts the statistics category, so ajs_user_id is never set before consent is given.
Frequently asked questions
It doesn't contain sensitive data by itself, just an internal user identifier used for analytics. However, since it's tied to an account, it's considered personal data under GDPR.
Because it's only set after the site calls Segment's identify function, typically at login or form submission, not automatically for every anonymous visitor.
The typical duration is 1 year, though it can vary depending on each site's specific configuration.
Yes, since it's an analytics cookie that links behavior to a user ID, it requires the visitor's prior consent under ePrivacy and GDPR.