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

<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.title = "<title of current page>";
  br_data.domain_key = "";
  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

VariableValue type, exampleDescription
br_data.search_termstring, "blue dress"The value of the search query describing the page.

Native App Implementation

You can include the Global Page 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 = search
  • search_term (see above)

Example requests:

https://p.brsrvr.com/pix.gif?
acct_id=6702
&cookie2=uid%3D1e7724c751a3f6e6241018d150144832e7528383%3Av%3Dapp%3Ats%3D0%3Ahc%3D1
&rand=35237846106223624
&type=pageview
&title=Blue%20Lace%20Dress
&url=http%3A%2F%2Fmerchantname.app%2Fsearch%2Fblue%2520lace%25dress
&ref=http%3A%2F%2Fmerchantname.app%2Fcategory%2Fdresses
&ptype=search
&search_term=blue%20lace%20dress

What to do for keyword searches with no results

If a user entered search term results in no results being sent back by Bloomreach - you will still need to fire a Search Result Page View pixel on the resulting page and pass the search term entered by the user.

From the combination of the Search Result Page View pixel and the API call received, we will track that this query results in no products being returned and use this data to populate the null results report in the dashboard.

We have seen a trend for some clients to report the no-results pages simply as "other" or redirect the users to a generic "not found page" type.

You are free to redirect users to any page of your choosing when no results are returned - however, if you wish this to be tracked, the Search Result Page View pixel must fire on the resulting page with the necessary details.