Tracking Events

Sessions

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","https://pixel.dealtale.com/pixel.bundle.js"),script.setAttribute("type","text/javascript"),document.getElementsByTagName("head")[0].appendChild(script);</script>
<!-- End Dealtale-->

Then, fire page view events with:

window.dtl.pageView();

Tracking Events

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

window.dtl.track(category, action, label, value)

Field Name

Value Type

Required

Description

Category

text

yes

Typically the object that was interacted with (e.g. 'Video')

Action

text

yes

The type of interaction (e.g. 'play')

Label

text

no

Useful for categorizing events (e.g. 'Fall Campaign')

Value

number

no

A numeric value associated with the event (e.g. 42)

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”)

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 Name

Value Type

Required

Description

ID

text

yes

User’s UUID on from your database.

email

text

no

User's email

name

text

no

User's full name

Usage examples:

// only uuid
window.dtl.identifyUser(“2432-23423-234”)
// 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.