Content Page View Pixel - Bloomreach Experience - Open Source CMS

Content Page View Pixel

Content Page View Tracking

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 = "<Bloomreach Provided Account ID>";
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 Result 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”

Native App Implementation

Include the Global View variables and the following variables for native app implementation:

  • catalogs (see below)
  • item_id (see above)
  • item_name (see above)

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

Catalogs format

You will have to manually format the catalogs parameter for native app implementation.

  • Example catalogs parameter: &catalogs=cat0%3Dcontent_en%3Av0%3Dstore123.v1%3Dstore456%21cat1%3Dproduct%3Av0%3Dstore123.v1%3Dstore456
  • The catalog name is encoded by prefixing "cat" + "the index of the catalog starting from 0" + "=" + "the catalog name"
  • Each catalog in catalogs is separated by an "!"
  • View IDs
    • The view_id is encoded by prefixing "v" + "the index of the view_id starting from 0" + "=" + "the view_id"
    • Catalog name and view_id are separated by a ":"
    • Multiple view_ids are separated by a "."

Implementation scenarios for catalogs

Note that the examples here are not percent encoded. Remember to percent encode your parameters for native app implementation.
Scenario Example
Single catalog, no views cat0=content_en
Multiple catalogs, no views cat0=content_en!cat1=product
Single catalog, one view cat0=content_en:v0=store123
Single catalog, multiple views cat0=content_en:v0=store123.v1=store456
Multiple catalogs, one has multiple views and one has no views cat0=content_en:v0=store123.v1=store456!cat1=product
Multiple catalogs, both have multiple views cat0=content_en:v0=store123.v1=store456!cat1=product:v0=store123.v1=store456
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?