Understanding how visitors interact with your embedded Horizon experience is key to optimizing performance, engagement and conversions.
Here, we cover how to track both sessions and user events when Horizon is embedded on your website.
This article explains:
Are there statistics in Horizon?
Not at this moment, but we are currently working on making basic statistics available directly in Horizon.
So, if you want to track how users interact with your Horizon leaflets, you must ensure that your tracking platforms are capturing the data for now.
Tracking sessions for Horizon
Sessions - along with bounce rate, average time spent, etc. - can be tracked if you have a tracking system set up on your website. Because your Horizon leaflet is embedded directly on your website, sessions are tracked just like for any other page on your site.
Simply ensure that your tracking software (such as Google Analytics, Matomo, or Adobe Analytics) is active on the page where Horizon is embedded.
Event-based, not URL-based, tracking for Horizon
As your Horizon leaflets are embedded directly on your page, the URL is the same no matter how far the visitor scrolls and how many pages they view.
So, instead of tracking via a different URL per page, tracking specific actions in your Horizon leaflet - such as clicks, page views, etc. - can be tracked by Horizon exposing page information through the Horizon API.
This makes it possible to, for example, detect when a specific page enters the view port, and then send that information to your analytics platform.
In short, tracking for Horizon is event-based instead of URL-based.
And that's why, to set up tracking for events in Horizon, you need to capture information from the Horizon API.
The Horizon API
The Horizon API allows you to capture detailed user behavior - such as clicks, navigation, and much more - and send that data to your preferred analytics tools.
By subscribing to these events, you can gain deeper insights into how users interact with your Horizon content and link those insights with other visitor data across your site.
Which events can be tracked?
The Horizon API provides a range of events, like clicks and navigation behaviors. These events can be captured and pushed to your data platform.
For a full list of available events and implementation examples, see our technical documentation:
How to subscribe to Horizon events
To begin capture and track Horizon events, follow these general steps:
Ensure the Horizon embed is initialized correctly on your webpage.
Use the Horizon API to subscribe to the events you want to track.
Forward the event data to your analytics platform or data layer.
Example:
api.offer.subscribe((offerEvent) => {
if (offerEvent.action === 'click'){
const offerData = offerEvent.value;
// your code to push the clicked CTA to your statistics
// your current code to push the product to the basket, generate a modal, etc (in this case just log the data)
console.log(offerData)
}
});This code listens for the click event and logs the data, which you can then forward to your analytics platform.
Next steps
Start by identifying the key actions you want to track from Horizon, and use the API to capture those events.
Need help setting up event tracking or integrating with your platform? Reach out to our support team in the chat in the Horizon admin, or, alternatively, to support@ipaper.io. We’ll be happy to guide you.
