Configure and use third-party analytics integrations with the Layers Tracking Pixel
The Layers Tracking Pixel supports forwarding events to third-party analytics services. This allows you to leverage your existing analytics infrastructure while benefiting from Layers’ advanced tracking capabilities. The integration system is designed to be:
Microsoft Clarity is a free analytics tool that helps you understand how users interact with your website through session recordings, heatmaps, and insights.
The Layers Tracking Pixel can forward events to Clarity if it’s already loaded on your page. This integration does not load the Clarity script itself - you must add the Clarity script to your theme separately.
Blotout.io is a privacy-first customer data platform that helps you collect, unify, and activate customer data.
The Layers Tracking Pixel can forward events to Blotout if it’s already loaded on your page. This integration does not load the Blotout script itself - you must add the Blotout script to your theme separately.
To enable third-party integrations, add the appropriate configuration to your Layers config:
Each integration supports the following configuration options:
By default, integrations only forward visual search and shop similar events to third-party services. These include:
similar-opened
: When a user opens the shop similar panelsimilar-closed
: When a user closes the shop similar panelsimilar-product-clicked
: When a user clicks on a product in shop similar resultsimage-search-opened
: When a user opens the image search panelimage-search-closed
: When a user closes the image search panelimage-search-search
: When a user performs an image searchimage-search-crop
: When a user crops an image for searchshop-similar-impression
: When shop similar recommendations are shownYou can customize which events are forwarded using the forwardedEvents
configuration option. If you want to forward other event types like product views or add to cart events, you’ll need to explicitly specify them in the configuration.
Here’s a complete example of configuring both Microsoft Clarity and Blotout.io integrations:
In this example: