Installing the Pixel
Copy and paste the following Liquid Code into yourlayouts/theme.liquid
file before any JavaScript that utilizes the Layers API. Replace {{ PUT YOUR TRACKING API KEY HERE}}
with the Tracking API Key found under Settings > API Access
.
Pixel Liquid Code
Pixel Liquid Code
Please contact support if you have any questions or could use some assistance installing the Storefront Pixel.
Events Captured by Pixel
- Collection View
- Product Click
- Product View
- Product Add to Cart
Line Item Properties
A Line Item Property with the key_layers_attribution
is appended to some add to cart forms. The value corresponds to the identifier of the request made using the Search or Browse API where the customer last saw the product before adding it to their cart. This property is only added if the customer clicked on products from the Search or Browse APIs.
Order Attributes
An Order Attribute with the key_layers_session_id
is appended to some orders. The value is the Shopify Session ID of the customer.
Misc
Browser Specs Supported
- Back/Forward Cache.
- Speculation Rules.
- SPA Navigation.