Guide
Smart Category Merchandising
Analytics Events
4min
As part of Klevu's category merchandising analytics event, one would require to integrate the following events. The collected data will be utilized to display analytics as part of Klevu's dashboard.
- Category Page Views: It includes every category page views including visits to other pages via pagination or by the selection of any filter.
- Category Product Clicks Products being clicked on category pages.
- Checked Out Products Products being bought by the shoppers on your webstore. For more information, please have a look at Analytics Events
Use this API endpoint to submit category page views activity.
GET
Params
Query Parameters
klevu_apiKey
required
String
This is your Klevu JS API Key.
klevu_categoryName
required
String
This is the name of the category being visited. For example, Stackable Rings. The name should not include parent categories.
klevu_categoryPath
required
String
This is the complete hierarchy of the category being visited. For example, Jewellery;Rings;Stackable Rings. Please note the use of a semicolon as the separator between a parent and a child category.
klevu_productIds
required
String
Comma separated list of product IDs being shown on the current page of the category page. For example, P1,P2,P3,P4,P5…
All the product IDs listed here are treated as impressions for these products.
klevu_pageStartsFrom
optional
String
Offset of the first product being shown on this page. For example, if you are displaying 30 products per page and if a customer is on the 2nd page, the value here should be 30. If on the 3rd page, it will be 60.
klevu_shopperIP
optional
String
IP address of the shopper who viewed the category page.
If calling the checkout HTTP call from javascript, this is an optional parameter.
klevu_activeFilters
optional
String
This refers to the filters that were applied during the category page view event. The format for the applied filters is "<filterKey1>:<filterValue1>;;<filterKey2>:<filterValue2>". Multiple filters are separated by ";;". For example, "style:Underseat Luggage;;color:blue".
klevu_abTestId
optional
String
The unique identifier of the A/B Test.
klevu_abTestVariantId
optional
String
The unique identifier of the A/B Test Variant.
Use this API endpoint to submit category page views activity.
GET
Params
Query Parameters
klevu_apiKey
required
String
This is your Klevu JS API Key.
klevu_categoryName
required
String
This is the name of the category being visited. For example, Stackable Rings. The name should not include parent categories.
klevu_categoryPath
required
String
This is the complete hierarchy of the category being visited. For example, Jewellery;Rings;Stackable Rings. Please note the use of a semicolon as the separator between a parent and a child category.
klevu_productId
required
String
This is the Klevu ID of the clicked product. eg. 54321-12345.
klevu_productGroupId
required
String
This is the parent ID of the clicked product. eg. 54321. For compound products with a parent and multiple child/variant products, this is the common ID which ties the products together. For simple products, please specify the same as klevu_productId.
klevu_productVariantId
required
String
This is the child/variant ID of the clicked product. eg. 12345. For compound products with a parent and multiple child/variant products, this is the ID of the specific variant. For simple products, please specify the same as klevu_productId.
klevu_productName
optional
String
Name of the product that was clicked.
klevu_productUrl
optional
String
URL of the product that was clicked.
klevu_productSku
optional
String
SKU code of the product that was clicked.
klevu_salePrice
optional
String
Decimal sale price of the product that was clicked.
klevu_productRatings
optional
Number
A decimal rating value between 0 and 5 of the product that was clicked.
klevu_productPosition
optional
Integer
Position of the product on the category page when it was clicked. For example, the value would be 0 if it is the first product on the first page. The value will be 30, if it is the first product on the 2nd page with 30 products being displayed per page.
klevu_shopperIP
optional
String
IP address of the shopper who clicked the product(s).
If calling the checkout HTTP call from javascript, this is an optional parameter.
klevu_activeFilters
optional
String
This refers to the filters that were applied during the product clicked event. The format for the applied filters is "<filterKey1>:<filterValue1>;;<filterKey2>:<filterValue2>". Multiple filters are separated by ";;". For example, "style:Underseat Luggage;;color:blue".
klevu_abTestId
optional
String
The unique identifier of the A/B Test.
klevu_abTestVariantId
optional
String
The unique identifier of the A/B Test Variant.
Use this API endpoint to report page view related A/B test variants.
POST
Params
Query Parameters
sourceId
required
String
The unique identifier of the element to which the A/B Test ID and Variant are assigned to. In this case, it will be a Category name.
abTestId
required
String
The unique identifier of the A/B Test.
abTestVariantId
required
String
The unique identifier of the A/B Test Variant.
type
required
String
The type of element to which an A/B Test will be assigned. For now, will be “CAT_NAV”.
Updated 25 Mar 2024
Did this page help you?