Category Page View Pixel
What is Category Page View Tracking
Category Page View Pixels are page view events that track views of any category listing pages, category product listing pages, or pages that you consider a category page.
How to Implement Category Page View Tracking
- Go to your Category Page Template and add the category-specific tracking parameters in the Global Tracking snippet.
- When your category 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 Category Pages
If a user applies a facet filter and refreshes results, Bloomreach expects that the Category 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 single page application interactions.
If your category pages are paginated, Bloomreach expects that the Category Page View pixel fires each time a user navigates to the next or previous category page. If your category 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 single page application interactions.
Category Page View Variables Checklist
The following lists the tracking variables required specifically for Category page view pixels. Please note that these must be included in addition to the Global Page View variables.
Variable | Value type, example | Description |
---|---|---|
cat | string (delimited by a | character), "Home|Clothing|Outerwear" | The breadcrumb of the page. Crumbs need to be delimited by pipe ( | character). Refer to the Bread Crumb Scenarios to determine what value to use for your bread crumb. |
cat_id | string (case sensitive), "catid123" | Unique category ID as referred to in the database/catalog. Bloomreach requires the cat_id field to be unique across your site. For Search implementations, the same cat_id value needs to be passed in the API call. Refer to the Category ID Scenarios to determine what value to use for your category ID. |
Bread Crumb Scenarios
Scenario | Bread crumb value | |
---|---|---|
1. | Your site has a unique breadcrumb path for every category. | Bloomreach expects the full breadcrumb path, separated by pipe (|) |
2. | No unique category ID, no unique crumb path | Category display name |
Category ID Scenarios
Scenario | Category ID value | |
---|---|---|
1. | Unique Category ID for every category (preferred scenario) | Bloomreach expects the leaf node Category ID to be sent in the pixel. |
2. | Site does not have a unique category ID for every category, but it has a unique crumb path for every category | Concatenate the unique crumb path without any delimiters or special characters, and send this value in the cat_id field. |
3. | No unique category ID, no unique crumb path | Please talk to your Bloomreach TPM before or during the Kickoff call to discuss options for your implementation. |
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 Category Page View Pixels
The following are the customized tracking snippets for both JavaScript and Non-JS environments. Here ptype is “category” for the Category 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 = "category";
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 Category specific Tracking Parameters in your Global Tracking Script
// in your CATEGORY PAGE TEMPLATE.
br_data.cat_id = "106121";
br_data.cat = "Home|Clothing|Outerwear";
// End - Category 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=18049885865571948
&type=pageview
&title=Dresses
&url=http%3A%2F%2Fmerchantname.app%2Fcategory%2Fdresses
&ref=http%3A%2F%2Fmerchantname.app%2Fhomepage
&ptype=category
&cat=home%7Cdresses
&cat_id=dresses
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 Category page View Pixel is working as expected. Follow the scenarios listed in the Test Scenarios - Page View guide.
Troubleshooting
If you’re seeing issues with the Category Page View Pixel, debug using this help article.
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.
Updated 5 months ago