Tracking codeΒΆ

Tracking code is needed to create the datalayer. There are two ways for setting up the datalayer.

Data attributes

This means that you will put all relevant information in data-attributes on HTML elements. Our library will then check user interactions with these HTML elements.

Behind the scenes the data attributes library will call the Javascript API.

Javascript

The Javascript API is a function that you can call directly to do tracking. This means, however, that you yourself will be responsible for detecting user interaction.