Cookie (_br_uid_2)

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.

Note that these Organic API requests do not use the _br_uid_2 cookie:

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

Parameter value

In your API requests, the _br_uid_2 parameter should use the following value, which is already encoded:


Native App and non-JS implementations

For native app and non-Javascript implementations, you must generate your own _br_uid_2 value:


For UUID, we suggest using the following:

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

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



Cookie expiration

The default expiration of the _br_uid_2 cookie is a maximum of 2 years in the JavaScript pixel tracker. However, individual browsers’ policies might make it expire even sooner.