In most cases we are able to track product views via our script once we have been integrated into your website but in some cases we are unable to as your site doesn't contain enough page data for us to track views on your product pages.
This tracking is required to make use of our Product Views prompt.
You need to insert the following code on product pages and ensure the fields reflect the current product being viewed.
window.sfDataLayer = window.sfDataLayer || ;
"sku": "220165", // parent product sku
"name": "Product Title",
"variant": "Color: Red, Size: Small",
"price": 25.00, // ex tax price
- sku - (required) - this is the parent product ID. For example, the ID of a t-shirt product.
- name - (recommended) - the name of the product.
- variant - (recommended) - the name of the variant.
- price - (recommended) - the price of the product excluding tax.
- currency - (recommended) - the currency of the product's price.
Please not that the sku and parent_sku should match those used in the Order Tracking.
We also support the following but are optional:
- brand - (optional) - the name of the brand.
- category - (optional) - a comma separated list of categories. Nested categories should be denoted by a >.