Product Page View Pixel

To add the Product Page View pixels, go to your Product Page Template and add the product specific tracking parameters in the Global Tracking snippet. If your product pages are loaded via Dynamic Refresh, please add additional handlers to be able to track virtual page view interactions.

<script type="text/javascript">
  var br_data = br_data || {};
  // Global tracking parameters
  br_data.acct_id = "<Bloomreach Provided Account ID>"; 
  br_data.ptype = "product";
  br_data.title = "<title of current page>";
  br_data.domain_key = "";
  br_data.user_id = "";
  br_data.view_id = "";
  br_data.tms = ""
 
  // INSERT the Product specific Tracking Parameters in your Global Tracking Script
  // in your PRODUCT PAGE TEMPLATE.
  br_data.prod_id = "prod1234";
  br_data.prod_name = "Blue Lace Dress";
  br_data.sku = "sku7778";
  // End - Product specific Page Tracking Parameters
   
  (function() {
  var brtrk = document.createElement('script');
  brtrk.type = 'text/javascript';
  brtrk.async = true;
  brtrk.src = "//cdn.brcdn.com/v1/br-trk-{{BloomReach Account ID}}.js";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(brtrk, s);
  })();
</script>

Product Page View Variables

Variable

Value type, example

Description

br_data.prod_id

string (case sensitive), "prod1234"

This is the unique ID which describes a product or product collection. If a product is available in multiple SKUs (e.g. color/size combinations), this field refers to the id shared by all the SKUs for a product.

To determine what value to use for your product ID, refer to the Product ID Scenarios.

br_data.prod_name

string, "Blue Lace Dress"

The name of the product being viewed.

br_data.sku

string, "sku7778"

Unique sku ID that represents the selected variant of this product
(e.g. size M, color blue of a t-shirt).

If your site does not have SKUs, leave this blank.

Product ID Scenarios

The product ID value depends on whether it refers to a single product or to a product collection. The table below outlines multiple scenarios and the corresponding product ID value.

Scenario

Product ID value

Example value

Product Detail Page (PDP) for a single product

Enter the product ID.

If your product ID is prod1234:

br_data.prod_id="prod1234"

Product Collections have their own unique ID and are sold exactly like standalone products

Enter the collection ID. Make sure that this collection ID is sent in the feed as a product ID.

If your collection ID is collection5678:

br_data.prod_id="collection5678"

Product Collections have their own unique ID, but cannot be purchased as a whole; only a collections' individual parts can be purchased. Each of these individual parts have their own ID

Enter the collection ID. Make sure that this collection ID is sent in the feed as a product ID.

If your collection ID is collection5678:

br_data.prod_id="collection5678"

Products that are a part of a Collection but can be purchased from their own individual product page

Enter the product ID.

If your product ID is prod1234:

br_data.prod_id="prod1234"

Native App Implementation

You must include the Global Page View variables and the following variables for the native app implementation:

  • ptype = product
  • prod_id (see above)
  • prod_name (see above)
  • sku (see above)

For details on the native app implementation format, refer to the Non-JS Environment section in the Getting Started page. 

Refer to the Implementation Scenarios above for specific use cases of prod_id and sku.

Example requests:

https://p.brsrvr.com/pix.gif?
acct_id=6702
&cookie2=uid%3D1e7724c751a3f6e6241018d150144832e7528383%3Av%3Dapp%3Ats%3D0%3Ahc%3D1
&rand=79069731271669680
&type=pageview
&title=Blue%20Lace%20Dress
&url=http%3A%2F%2Fmerchantname.app%2Fproduct%2Fblue%2520lace%2520dress
&ref=http%3A%2F%2Fmerchantname.app%2Fcategory%2Fdresses
&ptype=product
&prod_id=prod1234
&prod_name=Blue%20Lace%20Dress
&sku=123-45

Did this page help you?