Search Result Page View Pixel

What are Search Result Page View Pixels


Search Result Page View Pixels are page view events that track views of any search listing or search results pages.

How to Implement Search Result Page View Pixels


  • Go to your Search Result Page Template and add the search-specific tracking parameters in the Global Tracking snippet.
  • When your search result page (or portions of it) is loaded dynamically via AJAX, remember to add additional handlers for single page application tracking.

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 single page application 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 single page application interactions.

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.

Search Result Page View Variables Checklist


The following lists the tracking variables required specifically for search result page view pixels. Please note that these must be included in addition to the Global Page View variables.

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

NOTE: If you have at least 1 catalog where the data type is content, then you should send the catalogs parameter.

📘

For a full list of required and optional variables, see Pixel Reference

Implementing Pixel in a Test Environment

If you are implementing the Pixel in a test environment (development, staging, UAT, etc.), you must add the test_data variable. When set to “true”, this flags pixel data to be ignored during analytics processing. Read more about the test_data variable here.

Tracking Snippets for Search Result Page View Pixels


The following are the customized tracking snippets for both JavaScript and Non-JS environments. Here ptype is “search” for the search result page view pixel.

JavaScript Implementation

<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.debug = true; // remove for production
  br_data.test_data = true; // remove for production


 
  // 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>

👍

Copying Snippet from Events Managment

You can copy the personalized tracking snippet from the Events Management application. We recommend using personalized snippets instead of copying from the documentation page. Currently, only acct_id and debug values are populated in the snippet. In future feature iterations, we will add domain_key, view_id, and other variables to further personalize the snippet for easy click-copy use.

Non-JavaScript Implementation

To integrate Bloomreach pixels in a Non-JS Environment, you can choose one of the following options:

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

Validate Pixel Implementation


If you’re integrating the Pixel, you can start tracking the test Pixel data using Events Management. It instantly gives you a broad overview of your Pixel’s health. You can continue using this when you go live.

🚧

Integration mode in Events Management

If you wish to inspect individual events from your test environment in real time, add debug=true. Such events will be treated as test data and will show in the Integration mode of the Events Management within seconds. Otherwise, you can inspect events in the Live mode with a delay of up to 2 hours.

For web validation

Once Pixel implementation is complete, use the Pixel Validator Chrome Plug-in to validate if the Search Result Page View Pixel is working as expected. Follow the scenarios listed in the Test Scenarios - Search guide.

Troubleshooting


Refer to the following help articles to troubleshoot issues related to the Search Result Page View Pixel:

Monitor and Manage Pixel Data


For long-term monitoring, use Pixel Monitor to get more detailed trend lines and set Pixel error alerts. We recommend that you subscribe to Pixel alerts.