Category Page
What actions are typically being tracked on this page:
- Product impression
- Product click
- Product add
What properties are typically being tracked on this page:
- Products
- name
- id (also known as SKU)
- Category name
- Number of products found
A typical walker implementation of a product's category page could look like this:
<!-- Category Page -->
<div class="listing" data-elb="product" data-elbaction="visible:impression">
<div class="sku" data-elb-product="id:42">SKU: 42</div>
<a href="#" data-elbaction="click">
<p class="name" data-elb-product="name:Everyday Ruck Snack">
Everyday Ruck Snack
</p>
</a>
<div class="price" data-elb-product="price:220">€ 220</div>
<p class="description">...</p>
<button data-elbaction="click:add">Add to cart</button>
</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. By clicking the button an elbLayer push will be generated with the following structure:
elbLayer.push(
'product add',
{
id: 42,
name: 'Everyday Ruck Snack',
price: 220
},
'visible',
);
We will add a lot more real world examples here in the upcoming weeks. If you want to know how to measure certain events or website elements with our walker please don't hesitate to reach out to us via [email protected].
Last modified 1yr ago