Home Page View Pixel

What is Home Page View Pixel

Home Page View Pixels are page-view events that track any home page or landing page that is considered a home page.

The data gathered by this Pixel helps improve Search's search relevance, recommendations engine, and overall user experience by learning more about customer preferences and onsite behavior.

How to implement Home Page View Pixel

Go to your Homepage template and add the Global Tracking snippet, with ptype set to "homepage".

When your homepage (or portions of it) is loaded dynamically via AJAX, remember to add additional handlers for single page application tracking.

Home Page View Variables Checklist

Home Page View Pixels do not require any additional page-type-specific tracking variables beyond the Global Page View variables. The only value that identifies a page view as a Home Page View is ptype.

VariableValue type, exampleDescription
ptypestring, "homepage"Identifies the page as a home page or landing page. Refer to the ptype parameter for the full list of allowed values.
📘

Note

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

Implementation scenarios

ScenarioGuidance
Direct-channel landing (bookmark or typed URL)You can leave the ref parameter empty only when a visitor lands on the homepage directly. For example, from a bookmark or by typing the URL. In every other case, ref must carry the previous page's URL. See ref in the Pixel Reference.
Homepage as the entry point of a sessionBloomreach's page view test scenarios consistently start a user journey at the homepage, firing the Home Page View Pixel before any Category, Product, or Search Result Page View Pixel. See Test Scenarios - Page View.
Multiple home or landing pagesptype = "homepage" applies to any page you consider a home page or landing page, not only a single root URL. For example, region-specific homepages or campaign landing pages. See ptype in the Pixel Reference.
Single Page Application (SPA) homepageIf your homepage (or portions of it) loads or refreshes dynamically via AJAX without a full page reload, add handlers so the Home Page View Pixel still fires correctly. See Single Page Application Tracking.
view_id on the homepageOnly pass view_id if it applies to your homepage. Passing a view_id value when it isn't required causes pixel validation to fail. See Test Scenarios - Search and Suggest.

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 Home Page View Pixel

The following are the customized tracking snippets for both JavaScript and Non-JS environments. Here ptype is "homepage" for the Home 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 = "homepage";
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
// Home Page View Pixels do not require additional page-type-specific
// tracking parameters beyond the Global Tracking parameters above.
(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>
📘

Note

Copying the snippet from Events diagnostics: You can copy the personalized tracking snippet from the Event diagnostics 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%3D8100391390189%3Av%3D12.0%3Ats%3D1744128139334%3Ahc%3D12
&tzo=-330
&rand=0.7890476645354053
&title=Women%27s%20Favorite%20Short-sleeve%20Crewneck%20shirt%20%7C
&user_id=undefined
&view_id=us
&domain_key=documentation_site
&ptype=homepage
&ref=https%3A%2F%2Fwww.documentation.bloomreach.com%2F
&type=pageview
&lang=en-GB
&url=https%3A%2F%2Fwww.documentation.bloomreach.com%2Fp%2F20902475%2Fwomen%27s-favorite-short-sleeve-crewneck-t-shirt%3Fsp%3D1%26rrec%3Dtrue
&rc=1
&can_url=https%3A%2F%2Fwww.documentation.bloomreach.com

Validate Pixel Implementation

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

🚧

Important

Integration mode in Events diagnostics: 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 Events diagnostics 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 Home Page View Pixel is working as expected. Follow the scenarios listed in the Test Scenarios - Page View guide.

Troubleshooting

If you're seeing missing or incomplete URLs for the Home Page View Pixel in Pixel reports, debug using this help article.

Monitor and Manage Pixel Data

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




Did this page help you?

© Bloomreach, Inc. All rights reserved.