Track Page View Events - Bloomreach Experience - Open Source CMS

Track Page View Events

The pixel tracks views on your pages, which are divided into the following page types:

  • Global
  • Virtual
  • Product
  • Content
  • Category
  • Search
  • Conversion

We recommend that you add the Page View Event Code to your master site template footer, which affects every page on your site, including your conversion (https) pages. This will allow Bloomreach to gather the information we need from your site to support your BloomReach content and optimize your user experience.

Global Page View Tracking

To get started, follow the steps given below:

1. Copy and paste the Global Page View Tracking Snippet & install on all of your pages 
2. Map the global variables in the tracking snippet.

Global Page View Tracking Snippet

<script type="text/javascript">
  var br_data = br_data || {};
  br_data.acct_id = "<Bloomreach Account ID>"; 
  br_data.ptype = "<Bloomreach Page Type>";
  br_data.domain_key = "<Bloomreach Domain Key>";
  br_data.catalogs = "[ { "name" : "example_en_prd" } ]";
  br_data.view_id = "<Bloomreach View ID>";
  br_data.user_id = "<Bloomreach User ID>";
  br_data.tms = "<Tag Management system to exclude during transition>"
 
  (function() {
  var brtrk = document.createElement('script');
  brtrk.type = 'text/javascript';
  brtrk.async = true;
  brtrk.src = 'https:' == document.location.protocol ? "https://cdns.brsrvr.com/v1/br-trk-{{BloomReach Account ID}}.js" : "http://cdn.brcdn.com/v1/br-trk-{{BloomReach Account ID}}.js";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(brtrk, s);
  })();
</script>

Global Page View Tracking Variables

Map these data variables in your Global Page View Code Snippet:

Account ID

Variable

Type

Example

Dependencies

Description

br_data.acct_id

 String

Variable Example: "1235"

Must be consistent with acct_id passed in API call.

 

The Bloomreach-provided Account identifier.

 

ptype

Variable

Type

Example

Dependencies

Description

br_data.ptype

String Variable Example: "homepage" Getting an accurate page type (ptype ) classification is a major component for all of Bloomreach's products. Maps your site's page type classifications to the values Bloomreach expects for our page type classifications. 

Required on all page views, including desktopmobile, and tablet versions. 

Bloomreach has 7 Page Type classifications.
See classification examples below.

Scenario

Example

Home Page Classification Any home page or landing page that is considered a home page needs to be classified as
br_data.ptype = "homepage"
Product Page Classification Any product, product bundle, product collection or sku set pages need to be classified as
br_data.ptype = "product"
Category Page Classification Any category listing pages, category product listing pages or pages that you consider a category page need to be classified as
br_data.ptype = "category"
Search Page Classification Any search listing or search results pages need to be classified as
br_data.ptype = "search"
Content Page Classification Any content pages need to be classified as 
br_data.ptype = "content"
Thematic Page Classification Bloomreach Thematic pages need to be classified as
br_data.ptype = "thematic"
Other Page Classification Any Conversion/ Thank You pages as well as any page types that are not one of the above need to be classified as
br_data.ptype = "other"

Domain Key (Required for multiple language versions)

Variable

Format

Example

Dependencies

Description

br_data.domain_key Variable Type: String
This field value is case-sensitive.

<accountName>_fr
Pass same Domain Key in the API call The Bloomreach-provided ID of the domain receiving the request. This parameter identifies the specific site language version when one account ID hosts multiple site versions with different languages. Bloomreach uses this value to ensure that only query and analytics data that pertain to that language are used for respective features.

Additional Information

This parameter is optional and only required if you integrate on a site with multiple language versions.

Your Bloomreach Technical Account Manager will provide the domain_key information during the technical Kickoff call if you have a site with multiple language versions.

View ID (Required for multiple site versions)

Variable

Type

Example

Dependencies

Description

br_data.view_id String
This field value is case-sensitive.
Variable Example: "10200" Consistent in Pixel, API & Feed. Identifies the specific site catalog view to show when one Bloomreach account ID hosts multiple site versions with unique product catalog characteristics, such as product price, availability, or title. 

Bloomreach uses View ID value to display the right product information for a user based on their site view. This must be consistent in the pixel, API and product catalog sent to Bloomreach.

Additional Information

This parameter is optional and only required if you integrate on a site with multiple site versions with unique product catalog characteristics.
Your Bloomreach Technical Account Manager will provide the view_id information during the technical Kickoff call if you have a site with multiple catalogs.

User ID (Required for tracking users with a universal customer ID)

Variable

Type

Example

Dependencies

Description

br_data.user_id  String Variable Example: "947345478564"   If you track users via a universal customer ID, populate this parameter with that ID. 
This should be an anonymized string (e.g. 947345478564). It should not contain the user's email or other personally identifiable information.

Additional Information

This parameter is optional and only required if you track users via a universal customer ID .
This will allow Bloomreach to recognize users in a way that is aligned with your system for various personalization features.  

If you do not track users this way, leave this blank. 

Tms (Required if you are transitioning from one tag manager to another)

Variable

Type

Example

Dependencies

Description

br_data.tms  String " tlm "   The name of the Tag Management system, that should be filtered out. 

In case of migration from one tag management system to another, there may be a transition time frame, when the pixel is fired by two systems simultaneously. Setting the "tms" param will allow  Bloomreach analytics system  to filter out duplicate pixels. 

Bloomreach has the following Tag Mgmt classifications:
tms="tlm" for Tealium 
 

Additional Information

This parameter is optional and only required during the transition time from one tag management system to another. 
Leave this field empty, if this scenario does not apply.

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.

Virtual Page View Tracking

If you have virtual page views, e.g. single page apps, AJAX interaction that load content outside of the normal page load cycle, you’ll need to add an additional AJAX response handler snippet. For example, if you have a link to a category or product page, which loads via AJAX, you need to add this response handler to the category or product page link. This will trigger a log event to Bloomreach, so we can track the AJAX product page view.

The Bloomreach pixel requires the Original Ref URL parameter to be sent on all virtual Page Loads.

Virtual Page View Code Snippet

var br_data = br_data || {};
 
// Global pixel parameters ...,
br_data.acct_id = "<Bloomreach Account ID>"; 
br_data.ptype = "<Bloomreach Page Type>";
br_data.domain_key = "<Bloomreach Domain Key>"; 
br_data.catalogs = "[ { "name" : "example_en_prd" } ]";
br_data.view_id = "<Bloomreach View ID>";
br_data.user_id = "<Bloomreach User ID>";
br_data.tms = "<Tag Management system to exclude during transition>"
 
// Add additional Product, Category, Search or Conversion specific pixel parameters
// here ...
 
 
// this parameter is required on all Virtual Page Loads
br_data.orig_ref_url = location.href;
 
BrTrk.getTracker().updateBrData(br_data);
BrTrk.getTracker().logPageView();

Virtual Page Load Variables

orig_ref_url

Variable

Type

Example

Dependencies

Description

br_data.orig_ref_url  String Variable Example: "https://myshop.com"   Referring URL

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.

User ID

Variable Format Example Description
br_data.user_id Variable Type: String Variable Example: "947345478564" If you track users via a universal customer ID, populate this parameter with that ID.
This should be an anonymized string (e.g. 947345478564). It should not contain the user's email or other personally identifiable information.

Additional Information

This parameter is optional and only required if you track users via a universal customer ID .
This will allow Bloomreach to recognize users in a way that is aligned with your system for various personalization features.  

If you do not track users this way, leave this blank.

Product Page View Tracking

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 = "1234"; 
  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 = 'https:' == document.location.protocol ? "https://cdns.brsrvr.com/v1/br-trk-{{Bloomreach Account ID}}.js" : "http://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 page has their 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"
Product Collection page with a unique ID, but cannot be purchased as a whole If your Product Collection has their own unique ID, but cannot be purchased as a whole; only the collections' individual parts can be purchased and 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"

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.

Content Page View Tracking

Pre-launch Phase for Content Search

This page also contains pixel requirements for Content Search (data-based) feature that is slated for launch in Q3 2020. It is currently in a pre-launch phase. To know more about this feature and activate/purchase the add-on module please reach out to your Bloomreach representative.

In the past, Bloomreach has only powered a single type of content - Products. With the addition of content search, we will be powering search for several different types of content at once. This makes it extremely crucial for Bloomreach to understand which type of Content is being interacted with. This will allow Bloomreach to aggregate the user behaviour signals independently for each content type and optimize the user experience accordingly. 

We call this grouping of similar type of content, a Catalog. 

The definition of what is contained in the Catalog is up to you as the customer. For example, you can choose to have Blogs, Articles, Videos within a single catalog, or split it across 3 catalogs. The implication is that on the Bloomreach side, a new search index is created for each different catalog and you will need to make an additional Content Search API call to access the information in a different index. Each new index would result in additional cost due to integration cost to Bloomreach. 

You can discuss the best setup for your site with your Bloomreach representative. 

If no catalog is passed in the pixel, it is assumed that the catalog is a product catalog.

This pixel is used to track the activity of non-product pages that are dedicated to a specific piece of content such as a Recipe Page, a Blog Page, Article Page etc. Since you are able to use Bloomreach to power multiple catalogs on your site, we need to know which Catalog the current content belongs to. 

Content Page View Code Snippet

< script type = "text/javascript" >
    var br_data = br_data ||
    {};

br_data.acct_id = "1234";
br_data.domain_key = "<default value>";
br_data.ptype = "content";

br_data.catalogs = [{"name": "example_en_recipes"}];
br_data.item_id = "recipe115718079035";
br_data.item_name = "California Avocado omelette Recipe";

(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>

Content Specific Page View Variables

ptype

Variable

Type

Example

Dependencies

Description

br_data.ptype

String Variable Example: "homepage" Getting an accurate page type (ptype ) classification is a major component for all of Bloomreach's products. Maps your site's page type classifications to the values Bloomreach expects for our page type classifications. 

Required on all page views, including desktopmobile, and tablet versions. 

Bloomreach has 7 Page Type classifications.
See classification examples below.

Scenario

Example

Home Page Classification Any home page or landing page that is considered a home page needs to be classified as
br_data.ptype = "homepage"
Product Page Classification Any product, product bundle, product collection or sku set pages need to be classified as
br_data.ptype = "product"
Category Page Classification Any category listing pages, category product listing pages or pages that you consider a category page need to be classified as
br_data.ptype = "category"
Search Page Classification Any search listing or search results pages need to be classified as
br_data.ptype = "search"
Content Page Classification Any content pages need to be classified as 
br_data.ptype = "content"
Thematic Page Classification Bloomreach Thematic pages need to be classified as
br_data.ptype = "thematic"
Other Page Classification Any Conversion/ Thank You pages as well as any page types that are not one of the above need to be classified as
br_data.ptype = "other"

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.

Item ID

Variable Description Example

item_id

Unique ID of the item being shown in the page. This identifier should match the item_id as specified in the feed. recipe115718079035

Item Name

Variable Description Example
item_name Name or the title of the Content page.

“California Avocado Omelette
Recipe”

Category Page View Tracking 

Go to your Category Page Template and add the category specific tracking parameters in the Global Tracking snippet. If your category pages are loaded via Dynamic Refresh outside the regular page load cycle, please add additional handlers to be able to track virtual page view interactions.

Faceting, Filtering and Pagination on Category Pages

If a user applies a facet filter and refreshes results, Bloomreach expects that the Category Page View pixel fires each time a filter is applied. Bloomreach uses this information to understand which filters are commonly used. In case your implementation is such that pages don't reload when a user applies a filter or facet, please add additional handlers to each filter/ facet to be able to track virtual page view interactions.
If your category pages are paginated, Bloomreach expects that the Category Page View pixel fires each time a user navigates to the next or previous category page. If your category pages don't reload when a user navigates to the next or previous page, please add additional handlers to the 'next' and 'previous' links to be able to track virtual page view interactions

Category Page View Code Snippet

<script type="text/javascript">
  var br_data = br_data || {};
  // Global tracking parameters
  br_data.acct_id = "1234"; 
  br_data.ptype = "category";
  br_data.domain_key = "";
  br_data.catalogs = [ { "name" : "example_en_prd" } ];
  br_data.user_id = "";
  br_data.view_id = "";
  br_data.tms = ""
 
  // INSERT the Category specific Tracking Parameters in your Global Tracking Script
  // in your CATEGORY PAGE TEMPLATE.
  br_data.cat_id = "106121";
  br_data.cat = "106120|106121";
 // End - Category page specific tracking parameters
   
   
  (function() {
  var brtrk = document.createElement('script');
  brtrk.type = 'text/javascript';
  brtrk.async = true;
  brtrk.src = 'https:' == document.location.protocol ? "https://cdns.brsrvr.com/v1/br-trk-{{Bloomreach Account ID}}.js" : "http://cdn.brcdn.com/v1/br-trk-{{Bloomreach Account ID}}.js";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(brtrk, s);
  })();
</script>

Category specific Page View Variables

Map these data variables in your Page view code snippet

Category ID

Variable

Type

Dependencies

Description

br_data.cat_id String 
This field value is case-sensitive.

The category ID needs to match the "crumb_id" in the feed.

For Search implementations, the unique category ID needs to be passed in the API call.

Unique category ID as referred to in the database/catalog.
Bloomreach requires the cat_id field to be unique across your site.

Scenario

Examples

Unique Category ID (preferred scenario)

Your site has has a unique category ID for every category, e.g.
Home = cat ID: 106119
Clothing = cat ID: 106120
Outerware = cat ID: 106121, then Bloomreach expects the leaf node Category ID to be sent in the pixel.

Variable Example: 
br_data.cat_id="106121"

No unique category ID, but unique crumb path

Your site page does not have a unique category ID for every category, but it has a unique crumb path for every category.
In this case, we ask you to concatenate the unique crumb path without any delimiters or special characters and send the value in the cat_id field.


Variable Example: 
Your unique crumb path is " jewelry|by-collection|inspirational-jewelry"
br_data.cat_id="jewelrybycollectioninspirationaljewelry"

No unique category ID and No unique crumb path Please talk to your Bloomreach TPM before or during the Kickoff call to discuss options for your implementation.

Category Name/ Bread crumb

Variable

Type

Dependencies

Description

br_data.cat  String
Crumbs need to be delimited by pipe (|) 
Match the "crumbs" field in the product feed The breadcrumb of the page.

Scenario

Examples

If you have a numeric representation of your bread crumb

Your site shows Home/Top/Casual Top and each of the bread crumbs have a numeric representation, such as 
Home = 106120 
Top = 106121 
Casual Top = 106122, the Bloomreach Pixel expects the full bread crumb path, separated by pipe (|).

Variable Format: 
br_data.cat=" <top level crumb>|<first level crumb>|<second level crumb>" 

Variable Example: 
br_data.cat="106120|106121|106122"

Unique breadcrumb path Your site has a unique bread crumb path for every category.

Variable Format: 
br_data.cat="<top level crumb>|<first level crumb>|<second level crumb>"
Crumbs need to be delimited by pipe (|) 

Variable Example: 
If your category crumb is "Home/Clothing/Outerwear" or "Home>Clothing>Outerwear" 
br_data.cat="Home|Clothing|Outerwear"
No unique category ID and Nounique crumb path Please talk to your Bloomreach TPM before or during the Kickoff call to discuss options for your implementation.

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.

Search Page View Tracking

Go to your Search Page Template and add the search specific tracking parameters in the Global Tracking snippet. If your search pages are loaded via Dynamic Refresh, please add additional handlers to be able to track virtual page view interactions.

Faceting, Filtering and Pagination on Search Pages

If a user applies a facet filter and refreshes results, Bloomreach expects that the Search Page View pixel fires each time a filter is applied. Bloomreach uses this information to understand which filters are commonly used. In case your implementation is such that pages don't reload when a user applies a filter or facet, please add additional handlers to each filter/ facet to be able to track virtual page view interactions.
If your category pages are paginated, Bloomreach expects that the Search Page View pixel fires each time a user navigates to the next or previous Search page. If your Search pages don't reload when a user navigates to the next or previous page, please add additional handlers to the 'next' and 'previous' links to be able to track virtual page view interactions

Search Page View Pixel Code Snippet

<script type="text/javascript">
  var br_data = br_data || {};
  // Global tracking parameters
  br_data.acct_id = "1234"; 
  br_data.ptype = "search";
  br_data.domain_key = "";
  br_data.catalogs = [ { "name" : "example_en_prd" } ];
  br_data.user_id = "";
  br_data.view_id = "";
  br_data.tms = ""
 
  // INSERT the Search specific Tracking Parameters in your Global Tracking Script
  // in your SEARCH RESULTS PAGE TEMPLATE.
  br_data.search_term = "blue dress"; 
  // End - Search Results page specific tracking parameters
   
  (function() {
  var brtrk = document.createElement('script');
  brtrk.type = 'text/javascript';
  brtrk.async = true;
  brtrk.src = 'https:' == document.location.protocol ? "https://cdns.brsrvr.com/v1/br-trk-{{Bloomreach Account ID}}.js" : "http://cdn.brcdn.com/v1/br-trk-{{Bloomreach Account ID}}.js";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(brtrk, s);
  })();
</script>

Search Page View Variables

Search Term

Variable

Type

Example

Dependencies

Description

br_data.search_term String br_data.search_term="blue dress"   The value of the search query describing the page.

For search page views only.

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.

Conversion Page View Tracking

Go to your Conversion/ Thank You Page Template and add basket and Conversion specific Page View parameters in the Global Tracking snippet. If your checkout pages are loaded via Dynamic Refresh, please add additional handlers to be able to track virtual page view interactions.

Conversion/ Thank You Page View - Implemenation Example

<script type="text/javascript">
  var br_data = br_data || {};
  // Global tracking parameters
  br_data.acct_id = "1234"; 
  br_data.ptype = "other";
  br_data.domain_key = "";
  br_data.catalogs = [ { "name" : "example_en_prd" } ]; 
  br_data.user_id = "";
  br_data.view_id = "";
  br_data.tms = ""
 
  // INSERT the Conversion & Basket specific Tracking Parameters in your Global Tracking Script
  // in your CONVERSION/ THANK YOU PAGE TEMPLATE. 
   br_data.is_conversion = 1;
   br_data.basket_value = "445.93";
   br_data.order_id = "12123455";
   br_data.basket =
   { "items":
    [
    {
      "prod_id" : "pid1111",
      "sku": "sku1234",
      "name": "Linen Pillow",
      "quantity": "1",
      "price": "35.95"
    },
    {
      "prod_id" : "pid2222",
      "sku": "",
      "name": "Linen Comforter",
      "quantity": "1",
      "price": "230.00"
    }, 
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2",
      "price": "79.99"
    }
   ]
  };
 ;
  // End - Conversion page specific tracking parameters
 
  (function() {
  var brtrk = document.createElement('script');
  brtrk.type = 'text/javascript';
  brtrk.async = true;
  brtrk.src = 'https:' == document.location.protocol ? "https://cdns.brsrvr.com/v1/br-trk-{{Bloomreach Account ID}}.js" : "http://cdn.brcdn.com/v1/br-trk-{{Bloomreach Account ID}}.js";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(brtrk, s);
  })();
</script>

Conversion/ Thank You Page Variables

Map data variables in your Pageview code snippet

 Is Conversion

Variable

Type

Example

Dependencies

Description

br_data.is_conversion Integer br_data.is_conversion=1 N/A Set to 1 on the Conversion or Thank you page 
(page after the customer completes the purchase). 

For Conversion Pages only.

Order ID

Variable

Type

Example

Dependencies

Description

br_data.order_id String br_data.order_id="12123455" This id has to match the orderID used in your analytics systems The order id associated with the order placed. This id should match the orderID used in your analytics systems.

For Conversion pages only

Additional Information

The Order ID is used to reconcile Bloomreach's analytics data with your analytics systems.

Basket Value

Variable

Type

Example

Dependencies

Description

br_data.basket_value String 

Variable Format:
The total price of the checkout basket in the account currency without any symbols.

If the checkout basket was $100 with $5 tax and $10 shipping, the value for this parameter should be 
br_data.basket_value="115.00".

This basket value has to match the basket value used in your analytics systems. The total price of the checkout basket including tax, discounts, shipping and/or discounts in the account currency. For Conversion pages only.

Scenario

Example

Your analytics system calculates basket value with tax & shipping

If the checkout basket was $100 with $5 tax and $10 shipping, the value for this parameter should be 
br_data.basket_value= "115.00"

Your analytics system calculates checkout with discount, tax & shipping If the checkout basket was $100 with $0 tax, $10 discount and $10 shipping, the value for this parameter should be 
br_data.basket_value= "100.00"

Basket

Variable

Type

Description

br_data.basket

Object

This object contains a property called `items` which is an array of the product objects purchased. For each product in the `items` array, the following properties should be included as specified:

{ "items":
   [
    {
      "prod_id" : "pid123456",
      "sku": "sku789",
      "name": "Cashmere Sweater",
      "quantity": "1",
      "price": "65.95"
    },
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2",
      "price": "79.99"
    }
   ]
};
Detailed conversion parameters for each product that was purchased. 

For Conversion pages only.

Basket Object Items

Type

Dependency

Description

prod_id String Needs to match Product ID sent in feed

This is the unique ID, which describes a product, product bundle, product collection or sku set.

sku String Needs to match SKU ID sent in feed.

Only applies if your site has SKUs.
If your site has skus, list the sku(s) in the basket.
name String   The name of the product in the basket.
quantity Integer N/A The quantity of the product in the basket.
price String   The unit price *per* product, not the total price. 
If item is on sale, this is the unit sale price.

Scenario

Example

2 Products, 
→ the first product has a sku, 
→ the second product does not have a Sku

2 products, first product has a sku, second product does not have a sku.

First Product: Individual Product 
Product ID: pid123456
Sku ID: sku789

Second Product: Individual Product
Product ID: pid56789

{ "items":
   [
    {
      "prod_id" : "pid123456",
      "sku": "sku789",
      "name": "Cashmere Sweater",
      "quantity": "1",
      "price": "65.95"
    },
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2"
      "price": "79.99"
    }
   ]
};
2 Products, 
→ the first product (Pullover) was purchased in White and Blue (2 different Skus) 
→ the second product does not have a Sku

The first product was purchased in two Skus (e.g. a Pullover purchased in white and blue), the second product does not have a sku.

First Product: Individual Product purchased in 2 Skus 
Product ID (e.g. Pullover): pid123456
Sku ID 1 (white): sku789
Sku ID 2 (blue): sku790

Second Product: Individual Product
Product ID: pid56789

{ "items":
   [
    {
      "prod_id" : "pid123456",
      "sku": "sku789",
      "name": "Cashmere Sweater White",
      "quantity": "2",
      "price": "120.00"
    },
    {
      "prod_id" : "pid123456",
      "sku": "sku790",
      "name": "Cashmere Sweater Blue",
      "quantity": "1",
      "price": "60.00"
    },
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2",
      "price": "79.99"
    }
   ]
};
2 Products, 
→ the first product is a Product Bundle with its own unique ID and is sold exactly like a standalone product 
→ the second product is an individual product.

Your Collection Pages have their own unique IDs and are sold exactly like standalone products, then enter the collection ID in the prod_id field. Make sure that this collection ID is sent in the feed in the product ID field.

First Product: Product Collection 
Collection ID: bundle223344

Second Product: Individual Product
Product ID: pid56789

{ "items":
   [
    {
      "prod_id" : "bundle223344",
      "sku": "",
      "name": "Linen Bed Sheet Set",
      "quantity": "1",
      "price": "265.95"
    },
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2",
      "price": "79.99"
    }
   ]
};
2 Products, 
→ the first product is a Product Collection/Sku Set with 2 individual products. The Collection has its own unique ID but it cannot be purchased as a whole
→ the second product is an individual product.

Your Product Collections have their own unique IDs, but cannot be purchased as a whole; only the collections' individual parts/products can be purchased and each of these individual parts have their own ID. In this case, list all individual products in the basket and the prod_id is the ID of each product. 

First Product: Product Collection 
Collection ID: bundle223344 with 2 individuals products.
Product ID: pid1111
Product ID: pid2222

Second Product: Individual Product
Product ID: pid56789


Make sure that each product ID is sent in the feed in the product ID field.

{ "items":
   [
    {
      "prod_id" : "pid1111",
      "sku": "",
      "name": "Linen Pillow",
      "quantity": "1",
      "price": "35.95"
    },
    {
      "prod_id" : "pid2222",
      "sku": "",
      "name": "Linen Comforter",
      "quantity": "1",
      "price": "230.00"
    }, 
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2",
      "price": "79.99"
    }
   ]
};
2 Products, 
→ the first product is a Product Collection/Sku Set with 2 individual products. The products are part of a collection, but can only be purchased from their own individual product page. 
→ the second product is an individual product.
Products that are a part of a Collection but can only be purchased from their own individual product page.
 

First Product: Product Collection 
Collection ID: bundle223344 with 2 individual products.
Product ID: pid1111
Product ID: pid2222

Second Product: Individual Product
Product ID: pid56789

{ "items":
   [
    {
      "prod_id" : "pid1111",
      "sku": "",
      "name": "Linen Pillow",
      "quantity": "1",
      "price": "35.95"
    },
    {
      "prod_id" : "pid2222",
      "sku": "",
      "name": "Linen Comforter",
      "quantity": "1",
      "price": "230.00"
    }, 
    {
      "prod_id" : "pid56789",
      "sku": "",
      "name": "Blue Skinny Jeans",
      "quantity": "2",
      "price": "79.99"
    }
   ]
};

Additional Information

The key-value data you send us in the basket will be transformed into the format below in the executed pixel (pix.gif) file:

E.g. !ipid123456'ssku789'nCashmere Sweater'q1.0'p69.95!ipid56789'nBlue Skinny Jeans'q1.0'p79.99

Each product in the cart will be separated by !. Each product's details will be separated by '.

  1. i<prod_id> - This is the product id and not another id such as sku id or collection id. This should match the unique product id sent in the feed.

  2. s<sku> - Sku id, only applies if you have skus.

  3. n<product_name>

  4. q<quantity>

  5. p<price> - This should be the unit price per product and not total price. If the item is on sale, this is the unit sale price. 

Multi-currency Variables

Multicurrency Pixel Guide

Variable

Type

Example

Dependencie

Description

br_data.currency String br_data.currency="GBP" N/A

Currency code for the transaction. Optional param. Default value is USD.

Supported currencies:    
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTC, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNH, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL
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?