Overview
Customers may occasionally observe cookie2 (or _br_uid_2) values being captured in the following format:
uid=genec2cf7fa4cb4f86f9c8778cdf1606891b126607c:gen=1
These values often trigger warnings such as "Invalid uid in Cookie parameters" within Event Diagnostics.
This article explains why generated cookie2 values appear, the expected format of a valid cookie2, and the circumstances under which Bloomreach automatically generates a fallback identifier.
Explanation
What is cookie2 (_br_uid_2)?
cookie2 (stored as _br_uid_2) is a required identifier for Bloomreach pixel requests. It serves as the visitor identifier and is generated during a visitor's first browser interaction with the site.
The identifier is typically stored in:
- Browser local storage
- Browser cookies
Subsequent pixel events use this value to associate activity with the same visitor.
Expected Format of a Valid cookie2
Kindly review this https://documentation.bloomreach.com/discovery/docs/pixel-reference#cookie2
What Does uid=gen...:gen=1 Mean?
When Bloomreach receives an event without a valid cookie2 value, the platform automatically assigns a generated identifier to allow event processing to continue.
Example :uid=genec2cf7fa4cb4f86f9c8778cdf1606891b126607c:gen=1
| Component | Description |
|---|---|
uid=gen... |
System-generated visitor identifier |
gen=1 |
Flag indicating the UID was generated by the platform |
Why Are Generated IDs Created?
Generated IDs are assigned when Bloomreach cannot find a valid cookie2 value in the incoming pixel request.
Common scenarios include:
1. Missing cookie2 on Initial Page Load
During a visitor's first interaction, the tracking script may send an event before the _br_uid_2 cookie has been fully created and persisted.
This timing condition can result in:
- Pixel event received
-
cookie2unavailable - Generated UID assigned
- Event Diagnostics warning displayed
This is a common first-hit timing issue in browser-based tracking systems.
2. Cookie Creation or Storage Delays
The browser may not yet have written the _br_uid_2 value to:
- Cookies
- Local storage
When the first event is dispatched, Bloomreach receives it without a valid visitor identifier.
3. Cookie Restrictions or Browser Settings
In some environments, browser policies, consent settings, or privacy controls may prevent the cookie from being available at event collection time.
When no valid cookie2 is present, Bloomreach falls back to generating a temporary identifier.
Summary
A cookie2 value containing uid=gen...:gen=1 indicates that Bloomreach generated a fallback visitor identifier because a valid _br_uid_2 value was unavailable when the event was received. This behavior is expected and is most commonly associated with first-hit timing scenarios, cookie creation delays, or browser storage restrictions.