Product Page View Pixel - Bloomreach Experience - Open Source CMS

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.

Product Page View Code Snippet

<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.domain_key = "";
  br_data.catalogs = "[ { "name" : "example_en_prd" } ]";
  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

 Product ID

Variable

Type

Dependencies

Description

br_data.prod_id String 
This field value is case-sensitive.
Product ID or Product Collection ID needs to match the product ID field in the feed This is the unique ID, which describes a product, product bundle, product collection or sku set. 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.

Scenario

Examples

Product Detail Page (PDP) If your product ID is prod1234, br_data.prod_id="prod1234"
Product Bundle page with a unique Product ID If your Product Bundle has its own unique ID and is sold exactly like a standalone product, enter the bundle ID. Make sure that this bundle ID is sent in the feed as a product ID.

If your bundle ID is bundle5678, br_data.prod_id="bundle5678"

If you sell Collections, you can implement the pixel in several different ways. The table below outlines multiple scenarios and the pixel requirements for each.

Scenario

Examples

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"

Product Name

Variable

Type

Example

Dependencies

Description

br_data.prod_name String "Blue Lace Dress" N/A The name of the product being viewed.

For Product PageViews (single product, product collection, product bundle, or sku set pages) only.

Sku

Variable

Type

Example

Dependencies

Description

br_data.sku String "sku7778" Needs to match the sku ID field in the feed. Unique sku ID that representing 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.

Catalogs

Variable

Format

Example

Description

br_data.catalogs

Array of Catalog objects

"[ { "name" : "example_en_prd" } ]"

List of catalogs that are shown in the page. In case the page has multiple tabs, only the catalogs of the selected (and visualized) tabs should be included. If multiple catalogs are shown in the active page (or tab) all of them should be included.

Native App Implementation

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

  • ptype (see above)
  • 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:

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?