Tracking Events


Session time is 30 minutes and is extended if the user is still having interaction with the pages.

Params, such as UTM params, referrer, and geolocation information collected automatically and will be available on every you will analyze in the platform.

Collecting Page View Events

Page view events are being collected automatically, and there is nothing needed to implement.

Manual Page View Events

If you would like to collect page view manually, simply add the flag manualPageView: true to the pixel script, for example:

<!-- Dealtale -->
<script>window._dtPixelLayer={orgId:"XXXXXXXXXXXXXXX", manualPageView: true };var script=document.createElement("script");script.setAttribute("src",""),script.setAttribute("type","text/javascript"),document.getElementsByTagName("head")[0].appendChild(script);</script>
<!-- End Dealtale-->

Then, fire page view events with:


Tracking Events

In order to fire track events, use the following example:

window.dtl.track(category, action, label, value, meta)
Field NameValue TypeRequiredDescription
CategorytextyesTypically the object that was interacted with (e.g. 'Video')
ActiontextyesThe type of interaction (e.g. 'play')
LabeltextnoUseful for categorizing events (e.g. 'Fall Campaign')
ValuenumbernoA numeric value associated with the event (e.g. 42)
MetaobjectnoA generic JSON object.

The keys of the object SHOULD NOT contain these reserved keys:

If you want to send an event without label, just pass null instead.

window.dtl.track(“Video”, “Play”, null, 450)

Arguments can be omitted when empty.

window.dtl.track(“Video”, “ShowMore”)

If you want to send larger data, you can pass in an object to meta.

window.dtl.track("Video", "Play", null, 450, { "resolution": "1080p", "Browser": "Chrome" })

Identifying a User

Our platform provides user identification as well as retrospective detection. It means that a user is colored on first interaction with your website, and later, if he is registered or logged in after a few days, we are able to attach all his previous sessions.

In order to identify a user within a session, use the following functionality:

window.dtl.identifyUser(ID, email, name)
Field NameValue TypeRequiredDescription
IDtextyesUser’s UUID on from your database.
emailtextnoUser's email
nametextnoUser's full name

Usage examples:

// only uuid
// uuid, email
window.dtl.identifyUser(“2432-23423-234”, “[email protected]”) 
// uuid, email, name
window.dtl.identifyUser(“2432-23423-234”, null ,”John Smith”)

If you are having any issues during the implementation, contact us.

To sign up for a free trial, click here.

What’s Next