Virtual Page View Pixel - Bloomreach Experience - Open Source CMS

Virtual Page View Pixel

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 Provided 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.

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?