Walker.js docs
Search
K

Search & Result Page

What actions are typically being tracked on this page:
  • Search view
  • Product impression
  • Product click
  • Search click
What properties are typically being tracked on this page:
  • Products
    • name
    • id (also known as SKU)
  • Search term
  • Number of products found
A typical walker implementation of a product's detail page could look like this:
<!-- Search Result Page -->
<div
id="search_list"
data-elb="search"
data-elbaction="load:view"
data-elb-search="term:'crazy shorts';results:14"
>
<div data-elb="product" data-elbaction="visible:impression;click" data-elb-product="id:1">...</div>
<div data-elb="product" data-elbaction="visible:impression;click" data-elb-product="id:2">...</div>
...
</div>
Once a page is loaded by a user all property values from the element as well as all child elements of the entity-container and their parents will be collected. In the background an elbLayer push will be generated with the following structure:
// on load
elbLayer.push('search view', { term: 'crazy shorts', results: 2 }, 'load');
// when visible
elbLayer.push('product impression', { id: 1 }, 'visible');
elbLayer.push('product impression', { id: 2 }, 'visible');
// by clicking on a product (since click is not related, both fire)
elbLayer.push('product click', { id: 2 }, 'click');
elbLayer.push('search click', { id: 2, term: 'crazy shorts', results: 2 }, 'click');