data-track-directΒΆ

Usually you only want to trigger the view of an element when it really is in view. However, sometimes it is also not necessary or is it hard to get the data-track-contentview attribute on the correct element.

To make it possible to override the check for viewability, it is possible to add a data-track-direct attribute.

<div data-track-funnelstepview='{
    "funnelName": "Newsletter subscription",
    "funnelStep": "Success"
}' data-track-direct="True">
...
</div>

The example above is used for the success message / step after filling out the newsletter subscription form. It is not required that the message will be in the viewport. Therefore, we can use data-track-direct to track the action based on the fact that the element is on the page instead of visible.