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. 

< 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_prd>" } ];
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 Page View Variables

Variable

Value type, 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.

If you are integrating Content Search, you must add br_data.catalogs to every page view pixel. You can include br_data.catalogs with the other global tracking parameters.

br_data.item_id

string, "recipe115718079035"

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

br_data.item_name

string, "California Avocado Omelette Recipe"

Name or the title of the content page.

Native App Implementation

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

  • ptype = content
  • 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.

ScenarioExample
Single catalog, no viewscat0=content_en
Multiple catalogs, no viewscat0=content_en!cat1=product
Single catalog, one viewcat0=content_en:v0=store123
Single catalog, multiple viewscat0=content_en:v0=store123.v1=store456
Multiple catalogs, one has multiple views and one has no viewscat0=content_en:v0=store123.v1=store456!cat1=product
Multiple catalogs, both have multiple viewscat0=content_en:v0=store123.v1=store456!cat1=product:v0=store123.v1=store456

Did this page help you?