Cookie - Bloomreach Experience - Open Source CMS

Cookie

_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

GET http://core.dxpapi.com//api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&domain_key=example_com
&request_id=8488604508809
&_br_uid_2=uid%3D7797606432021%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55
&url=http://www.example.com/index.html?q=dresses
&request_type=search
&search_type=keyword
&q=dresses
&rows=5
&start=0
&fl=pid,title,brand,sku_swatch_images
 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.

 &_br_uid_2=uid%3D7797686432023%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55

 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:

&_br_uid_2=uid%3D1e7724c751a3f6e6241018d150144832e7528383%3Av%3Dapp%3Ats%3D0%3Ahc%3D1
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?