Event Tracking

All event tracking is done using an async javascript code snippet that gathers the information and push it to our servers where it is stored for you. The tracker is built to never interfere with your sites performance or functionality. It will fail silently in the event something would go wrong and it will queue up messages when it's not able to send them right away.

Note on Data Privacy

For certain events, such as the order completion event, we de-identify the personal information as soon as it arrives to our servers using Googles enterprise grade Data Loss Prevention-solution. You can read more about the Google Data Loss Prevention here, but in a nut shell it encrypts the data rendering it non-readable and non-identifiable.


The setup is pretty straight forward. To initialize the tracker, add the following code to your page header.

/* Initiate the tracker */
<script type="text/javascript">const TRACKER_KEY="[ADD YOUR TRACKER KEY]";window.zlt_queue||(window.zlt_queue=[]),window.zlt_queue2||(window.zlt_queue2=[]),window.zlt=function(){},window.zlt.rec=function(u,w){w={p:u,d:w};window.zlt_queue2.push(w)},zlt.track=function(u,w){var n={};n[u]=w,window.zlt_queue.push(n)};</script>
<script async src="https://assets.zubitracker.io/v1/tracker/track.js"></script>

All done! Now you can start tracking events using the zlt.track(); function. You may specify custom events for tracking, but for ecommerce clients we recommend that you get started with the ones described in the ecommerce standard events section first.

Standard events inspiration

User: Recommended to always be included everywhere on the page where the user is identifying themselves

Tracks and identifies the user on the website. This event makes it possible to refer all other events to an actual user instead of just a "visitor".

Page Views: Automatically implemented with the tracking

Tracking the number of times a web page is viewed. This event provides insights into overall traffic and engagement on the website.

Form Submissions: Auto Capture

Tracking when a user submits a form on the website, such as a contact form, sign-up form, or checkout form. It helps measure lead generation and conversion rates. - Auto Capture within the tracking

Scroll Tracking: Auto Capture

Tracking how far users scroll down a web page. It helps understand user engagement and identifies potential areas of improvement on long-form content pages.

Video Views: Auto Capture

Tracking the number of times a video is viewed, as well as the duration of views. This event is particularly relevant for websites that host video content.


Tracking user clicks on buttons, links, banners, or other interactive elements on the website. It helps measure user interaction and engagement.

Conversion/Goal Completions:

Tracking specific actions or goals that are important to the website owner, such signing up for a newsletter, downloading a file, or subscribing to a service.

Social Interactions:

Tracking social media interactions, such as likes, shares, or comments on content shared from the website. It helps measure social engagement and the effectiveness of social media campaigns.

Exit Intent:

Tracking when a user intends to leave the website, often indicated by mouse movement towards the browser's close button or navigation bar. It can trigger specific actions, such as displaying exit-intent pop-ups or offering incentives to encourage users to stay.

Ecommerce standard events

Prepare for product recommendation

Note: This is only applicable for ecommerce clients

The following two events are required in order to run product recommendations.


Active sources

This feature requires one of the following sources to be active

Last updated