Browsing events
Overview
Browsing events represent customer interactions while browsing your eCommerce site.
trackProductsSearched (Product)
The trackProductsSearched (Product)
call is triggered when a customer searches for products.
Parameters
Parameter | Data type | Description |
---|---|---|
| string | The query string used to search for products. |
Example
affirm.analytics.trackProductsSearched("shirts");
The trackProductListViewed
(list, [Product]) is triggered when a customer views a list of products, such as after completing a search, or on a category page that features multiple products.
Parameters
Example
affirm.analytics.trackProductListViewed({
"listId": "L12345",
"category": "Apparel"
}, [{
"brand": "Affirm",
"category": "Apparel",
"coupon": "SUMMER2018",
"name": "Affirm T-Shirt",
"price": 730,
"productId": "SKU-1234",
"quantity": 1,
"variant": "Black"
}, {
"brand": "Affirm",
"category": "Apparel",
"coupon": "SUMMER2018",
"name": "Affirm Turtleneck Sweater",
"price": 2190,
"productId": "SKU-5678",
"quantity": 1,
"variant": "Black"
}]);
Objects
List
Represents a list of products appearing on any given page. This is frequently used to track products returned as a search result or included on a category page.
Parameter | Data type | Description |
---|---|---|
listId | string | A unique identifier representing the list of products. |
category | string | A description of the category the list belongs to, if any. |
name | string | The display name of the list. |
Product
Represents any offered product or service.
Parameter | Description | |
---|---|---|
brand | string | The brand of the product (e.g., Affirm). |
category | string | The category the product belongs to (e.g. Apparel). |
coupon | string | Any coupon code associated with the particular instance of this product. |
name | string | The full name of the product (e.g., Affirm T-Shirt). |
price | integer | The price of the product. The value must be non-negative and represented as cents instead of dollars. |
productID | string | A unique identifier representing the product, such as the SKU or an internal database identifier used by the merchant. |
quantity | integer | The quantity of the product. The value must be non-negative. |
variant | string | The variant of the product (e.g. black). |
currency | string | A currency code associated with this product (USD) |
Updated about 1 year ago