data-track-dataviewΒΆ

A dataview is basically the rest event type. It is used for asynchronuous tracking events. Like the interaction with the Youtube API.

<div data-track-dataview='{
    "contentInteractionName": "Video started",
    "videoID": "123123asd",
    "videoTitle": "Awesome remix",
    "videoDuration": "60"
}'>
...
</div>

The above example is the example of the tracking of video that is being started.

The moment this div is on the page, it is tracked directly. So it does not need to be in the viewport.

Usually it is easier to use Javascript instead of data attributes for these types of events. You could use our Javascript API.