Suggest Event Pixel

❗️

Events always occur on a page view, so you must pass the associated page view pixel information together with the event pixel.

If you have an auto-suggest feature in your search form, when a user clicks on a search suggestion, BloomReach expects a Search 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. E.g. if the search leads to a Search Results Page, the Search Page View Pixel will send the Suggest Event information to Bloomreach. 

To get started, follow the steps given below:

1. Copy and paste the Suggest Event Tracking Snippet and install on all of your search suggestions. 
2. Map the search and suggest event variables in the tracking snippet.
3. Make sure to review the implementation scenarios to ensure that the search event data are sent to Bloomreach

Suggest Event Tracking Snippet

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);

Suggest Event Variables

VariableTypeExampleDescription
aqStringVariable Example: woThe display query (the one or more letters) that the user has actually typed. 
This is NOT the suggested word or phrase.
qStringVariable Example: woven scarfUser's typed search query submitted to search box
catalogsArray of ObjectsVariable Example: woven scarf

"name" : "example_products"
Specific catalog for which the suggestion was chosen. 

Example: If you have text suggestions for Product and text suggestions for Content, then you will send the name of the catalog that those text suggestions belongs to (e.g. if a suggestion is picked from product text suggest then you'd send "example_products", otherwise "example_content")

Implementation Scenarios

Please review each of the following scenarios and implement as it applies to your site.

ScenarioExample
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.
Implement the Suggest Event Code on the Suggest click.

The Product Page View Pixel that fires on the Product Page will automatically send the information captured in the Search Event to Bloomreach. 
Make sure that the Search Event Pixel fires before the Product Page View Pixel.
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.

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.

Native App Implementation

You can include the Global 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. 

  • type
  • aq (see above)
  • q (see above)
  • group
  • etype
NameVariableExampleDescription
Tracking TypetypeThe type of tracking fire. For events, type=event
Group TypegroupSpecifies the event grouping. Must not be empty.

For suggest events, group=suggest
Event Action TypeetypeSpecifies the event's action type. Must not be empty.

For suggest events, etype=click

Example requests:

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

Did this page help you?