Suggest Event Pixel
What are Suggest Event Pixels
If you have an auto-suggest feature in your search form, when a user clicks on a search suggestion or autocomplete entry, Bloomreach expects a Suggest Event to fire.
The information captured in a Suggest Event persists until the next page load happens (deferred) and the next Page View Pixel is fired.
For example, if the search leads to a Search Results Page, the Search Page View Pixel will send the Suggest Event information to Bloomreach.
How to Implement Suggest Event Pixels
Follow the steps below:
- Copy and paste the Suggest Event Tracking Snippet inside all of your search suggestion elements to install the Pixel.
- Configure the Suggest Event Variables in the Tracking Snippet.
- Make sure to review the implementation scenarios to ensure that the Search Event data is correctly sent to Bloomreach.
Suggest Event Pixels Variables Checklist
Listed below are the tracking variables required specifically for Search Event Pixels.
Required Variables
Variable | Value type, Example | Description |
---|---|---|
acct_id | String, “1235” | The Bloomreach-provided Account identifier. Value must be consistent with the account_id value passed in API call. |
group | String, “suggest” | This specifies the event grouping. Allowed values: suggest , cart , product , widget |
etype | String, “click” | Specifies the event’s action type. Allowed values: click , click-add , quickview , submit |
q | String, “blue dress” | The search query typed (and submitted) by the user in the search box. |
aq | String, “tabl” | “aq” is short for “Actual Query”. This is the final query that the user had actually typed right before clicking on an autosuggestion. |
Optional Variables
Variable | Value type, Example | Description |
---|---|---|
user_id | String, “61WwurfPU9f9dB5” | If you track users via a universal customer ID, populate this parameter with that ID. This should be an anonymized string and not any PII. |
Conditional variables - based on your implementation
Variable | Value type, Example | Description |
---|---|---|
view_id | String (Case sensitive), “10200” | The name of the product catalog view that would be searched against on the page where the event occurred. It identifies the catalog view to show when one Bloomreach account ID hosts multiple site versions. |
domain_key | String (Case sensitive), “bloomreach_fr” | The Bloomreach-provided ID of the domain receiving the request. Set Domain Key to the name of the product catalog that would be searched against on the page where the event occurred. |
title | String, “Best Sellers” | This is the title of the current page or screen name of the app view. |
ref | String, “https://www.homeoasis.com/category/mens-clothes" | This is the URL from the referrer screen. For a native mobile app, “ref” follows a synthetic structure that is used for identifying the content within the app rather than actual navigable URLs. |
catalogs | Array of Catalog objects, “[ { name : "products_en" } ]” | List of catalogs that are shown on the page. |
For a full list of required and optional variables, see Pixel Reference
Implementation Scenarios
Please review each of the following scenarios and implement as they apply to your site.
Scenario | Example |
---|---|
User types "wo " in Search Box and clicks on the auto-suggested term "woven scarf". The search result is displayed on a Search Results Page. | Implement the Suggest Event Code on the Suggest click. The Search Page View Pixel that fires on the Search Results Page will automatically send the information captured in the Suggest Event to Bloomreach. Make sure that the Suggest Event Pixel fires before the Search Page View Pixel. |
User enters an exact product name (or product ID) in the Search Bar. A product suggestions comes up and the user clicks on the Product Suggestions. The search redirects to a Product Page. | The system appends the attribute _br_psugg_q={search term} to the URL of the Product Page of the clicked suggestion. If a product suggestion is clicked from autosuggest results, ensure that the landing URL corresponds to the API response (with the corresponding suffix). The Product Page View Pixel that fires on the Product Page will capture this information to tag and track product suggestion sessions. More information about this process can be found in the Autosuggest API reference. |
User enters an exact category name (or cat ID) in the Search Bar. A category suggestion comes up and the user clicks on the Category Suggestion. The search redirects to a Category Page. | Implement the Suggest Event Code on the Suggest click. If a category suggestion is clicked from autosuggest results, the category title should be captured. The Category Page View Pixel that fires on the Category Page will automatically send the information captured in the Search Event to Bloomreach. Make sure that the Search Event Pixel fires before the Category Page View Pixel. |
Tracking Snippet for Suggest Event Pixels
JavaScript Implementation
Scenario: User types "wo" in the Search Box and then clicks on the auto-suggested term "woven scarf":
var searchData = {};
searchData["aq"] = "wo";
searchData["q"] = "woven scarf";
searchData["catalogs"] = [{ "name" : "example_products" }];
BrTrk.getTracker().logEvent("suggest","click", searchData, {},true);
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=86838131966165760
&type=event
&title=Home
&url=http%3A%2F%2Fmerchantname.app%2Fhomepage
&ref=http%3A%2F%2Fmerchantname.app%2Fcategory%2Fdresses
&group=suggest
&etype=click
&ptype=homepage
&q=blue%20lace%20dress
&aq=blu
Validate Pixel Implementation
Once Pixel implementation is complete, use the Pixel Validator Chrome Plug-in to validate if the Suggest Event Pixel is working as expected. Follow the scenarios listed in the Test Scenarios - Search guide.
Troubleshooting
If you’re having issues with the ‘q’ parameter, refer to this debugging 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