What is the ajs_anonymous_id cookie?
ajs_anonymous_id is a first-party cookie generated by Segment's Analytics.js JavaScript library, a widely used tool that collects and routes behavioral data to various analytics, marketing, or CRM platforms configured by the site owner.
The cookie appears as soon as the Segment script loads and runs on a page, regardless of whether the visitor is logged in. It is set on the domain of the site embedding Segment, not on segment.com.
What data it stores
The cookie's value is a randomly generated identifier (UUID-style), with no direct link to the visitor's name or email address as long as they haven't logged in or submitted an identifiable form.
Data collected through this identifier (pages viewed, events, clicks) is sent to Segment's servers and, through integrations configured by the site owner, may be forwarded to other third-party platforms (e.g., analytics tools, marketing automation, CRM systems).
What it is used for
The main purpose is behavioral continuity: it lets Segment and the site recognize the same visitor across repeat visits, even before login, and build a coherent history of interactions (pages viewed, products added to cart, forms submitted, etc.).
For the site owner, this cookie underpins user behavior reporting and audience segmentation for product or marketing analysis.
Does it require consent?
Under CookieFix's classification, ajs_anonymous_id falls into the statistics (analytics) category. Since it is used to track visitor behavior for measurement purposes, it does not qualify as strictly necessary under the ePrivacy rules and requires the user's prior consent under GDPR and its Romanian implementation (Law 506/2004).
The site owner must declare this cookie in the cookie policy, obtain explicit consent before the Segment script loads, and allow consent to be withdrawn at any time.
How to block or delete ajs_anonymous_id
A visitor can manually delete or block this cookie from browser settings (Chrome, Firefox, Safari, Edge – per-site cookie management), or use browser extensions that block tracking scripts.
- Deleting the cookie does not remove data already sent to Segment; it only generates a new anonymous identifier on the next visit.
- For site owners, a CMP such as CookieFix can automatically block the Segment script from loading until the visitor consents to the statistics category, preventing the cookie from being set prematurely.
Frequently asked questions
It's a cookie set by the Segment library that assigns each visitor an anonymous identifier, used to track their behavior on the site for analytics purposes.
No, it does not directly contain personal data such as a name or email, but it is used for behavioral tracking, which is why it is classified as a statistics/analytics cookie.
Yes. As an analytics cookie used for tracking, it requires prior consent under GDPR and Romania's ePrivacy legislation.
The typical duration is 1 year, though this can vary depending on the Segment configuration used by each site.