Search Result Page View Pixel - Bloomreach Experience - Open Source CMS

Search Result Page View Pixel

Search Result Page View Tracking

Go to your Search Result Page Template and add the search specific tracking parameters in the Global Tracking snippet. If your search result 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 Result Pages

If a user applies a facet filter and refreshes results, Bloomreach expects that the Search Result 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 Result Page View pixel fires each time a user navigates to the next or previous Search Result page. If your Search Result 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 Result Page View Pixel 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 = "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 = "//cdn.brcdn.com/v1/br-trk-{{BloomReach Account ID}}.js";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(brtrk, s);
  })();
</script>

Search Result 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 result 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.

Native App Implementation

You can include the Global View variables and the following variables. For details on the native app implementation format, refer to the Non-JS Environment section in the Getting Started page. 

  • ptype (see above)
  • search_term (see above)

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?