Cookie - Bloomreach Experience - The Headless Digital Experience Platform Built for Commerce


_br_uid_2 parameter

The _br_uid_2 cookie is a first-party cookie created by the Bloomreach tracking pixel library (BrTrk). This cookie creates a unique, anonymous identifier for every browser or device. It’s important to include this cookie in all of your API requests because it is used to power several features such as Testing, Targeting and 1:1 User Personalization.

Exception: Organic widgets and HTML-powered thematic searches. 

These Organic API requests don't use the _br_uid_2 cookie:

  • Related categories, related items and related products widgets
  • Thematic pages with HTML responses

Example of the cookie in an API call

Here's an example product search call that includes the cookie:

_br_uid_2 cookie

account_id=<Bloomreach Provided Account ID>
 The _br_uid_2 cookie is already encoded. 

Don't encode the cookie parameter value: _br_uid_2. Use this value exactly as it comes. It's already encoded.


 Native App and non-Javascript implementations

Do not use the _br_uid_2 value above. Instead, generate your own _br_uid_2 value.

The _br_uid_2 value format is uid={{UUID}}:v=app:ts=0:hc={{hitcount}}.

For the UUID value, we suggest using the following:

  • iOS devices - use the IDFA
  • Android devices - use the Android Advertising ID
  • Other devices - use the closest equivalent

The hitcount value should be 1 for a new visitor, or 2 for returning visitors. 

Example value:

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?