Track Product List Events
Product List events are used for tracking views and interactions of any kind of list of products on an e-commerce store. These events are more commonly used for the product list screens, but can also be used to track similar list-like elements such as:
- Shop-The-Look lists.
- Frequently-Bought-With lists.
- Product recommendations.
- Product search results.
Product list view event
In this section, we will showcase how to track product list views.
ProductListViewEvent
To track a product list view you can use the ProductListViewEvent
with the following attributes:
ProductListViewEvent(products: [ProductEntity], name: String?)
- Where
products
is an array of products being viewed from the list. - Where
name
is the name of the list being viewed. For the list names, you can use any kind of friendly name or a codified language to express the labeling of the list. E.g. ‘Shoes - Men - Sneakers’,‘Search results: “unisex shoes”’, ‘Product page upsells’
Example usage:
let product = ProductEntity(id: "productId", category: "software", currency: "USD", price: 99.99)
let event = ProductListViewEvent(products: [product], name: "snowplowProducts")
tracker.track(event)
ProductListViewEvent
To track a product list view you can use the ProductListViewEvent
with the following attributes:
ProductListViewEvent(products: List<ProductEntity>, name: String?)
- Where
products
is an array of products being viewed from the list. - Where
name
is the name of the list being viewed. For the list names, you can use any kind of friendly name or a codified language to express the labeling of the list. E.g. ‘Shoes - Men - Sneakers’,‘Search results: “unisex shoes”’, ‘Product page upsells’
Example usage:
val product = ProductEntity(
id = "productId",
category = "software",
currency = "USD",
price = 99.99
)
val event = ProductListViewEvent(listOf(product), name = "snowplowProducts")
tracker.track(event)
ProductListViewEvent
To track a product list view you can use the ProductListViewEvent
with the following attributes:
ProductListViewEvent(products: List<ProductEntity>, name: String?)
- Where
products
is an array of products being viewed from the list. - Where
name
is the name of the list being viewed. For the list names, you can use any kind of friendly name or a codified language to express the labeling of the list. E.g. ‘Shoes - Men - Sneakers’,‘Search results: “unisex shoes”’, ‘Product page upsells’
Example usage:
ProductEntity product = new ProductEntity(
"productId", // id
"software", // category
"USD", // currency
99.99 // price
);
List<Product> products = new ArrayList<>();
products.add(product);
ProductListViewEvent event = new ProductListViewEvent(
products, // products
"snowplowProducts" // name
);
tracker.track(event);
Product list click event
In this section, we will showcase how to track a click/selection of a product in a product list.
ProductListClickEvent
To track a click/selection of a product in a product list you can use the ProductListClickEvent
with the following attributes:
ProductListViewEvent(product: ProductEntity, name: String?)
- Where
product
is the product being clicked/selected from the list. - Where
name
is the name of the list the product is currently in. For the list names, you can use any kind of friendly name or a codified language to express the labeling of the list. E.g. ‘Shoes - Men - Sneakers’,‘Search results: “unisex shoes”’, ‘Product page upsells’
Example usage:
let product = ProductEntity(id: "productId", category: "software", currency: "USD", price: 99.99)
let event = ProductListClickEvent(product: product, name: "snowplowProducts")
tracker.track(event)
ProductListClickEvent
To track a click/selection of a product in a product list you can use the ProductListClickEvent
with the following attributes:
ProductListViewEvent(product: ProductEntity, name: String?)
- Where
product
is the product being clicked/selected from the list. - Where
name
is the name of the list the product is currently in. For the list names, you can use any kind of friendly name or a codified language to express the labeling of the list. E.g. ‘Shoes - Men - Sneakers’,‘Search results: “unisex shoes”’, ‘Product page upsells’
Example usage:
val product = ProductEntity(
id = "productId",
category = "software",
currency = "USD",
price = 99.99
)
val event = ProductListClickEvent(product, name = "snowplowProducts")
tracker.track(event)
ProductListClickEvent
To track a click/selection of a product in a product list you can use the ProductListClickEvent
with the following attributes:
ProductListViewEvent(product: ProductEntity, name: String?)
- Where
product
is the product being clicked/selected from the list. - Where
name
is the name of the list the product is currently in. For the list names, you can use any kind of friendly name or a codified language to express the labeling of the list. E.g. ‘Shoes - Men - Sneakers’,‘Search results: “unisex shoes”’, ‘Product page upsells’
Example usage:
ProductEntity product = new ProductEntity(
"productId", // id
"software", // category
"USD", // currency
99.99 // price
);
ProductListClickEvent event = new ProductListClickEvent(
product, // product
"snowplowProducts" // name
);
tracker.track(event);
Where ProductEntity
can have the following attributes:
attribute | type | description | required |
---|---|---|---|
id | string | SKU or product ID. | ✅ |
currency | string | Currency in which the product is being priced (ISO 4217). | ✅ |
price | number | Price of the product at the current time. | ✅ |
name | string | Name or title of the product. | ✘ |
category | string | Category the product belongs to. Use a consistent separator to express multiple levels. E.g. Woman/Shoes/Sneakers. The number of levels is defined by the user. | ✘ |
listPrice | number | Recommended or list price of a product. | ✘ |
quantity | number | Quantity of the product taking part in the action. Used for Cart events. | ✘ |
size | string | Size of the product. E.g. XL, XS, M. | ✘ |
variant | string | Variant of the product. E.g. Red, Heavy, Leather. | ✘ |
brand | string | Brand of the product. | ✘ |
inventoryStatus | string | Inventory status of the product. E.g. in stock, out of stock, preorder, backorder. | ✘ |
position | number | Position the product was presented in a list of products. Used in Product List events. | ✘ |
creativeId | string | Identifier/Name/Url for the creative presented on a list or product view. | ✘ |