Skip to content

Automatic events ​

The SDK sends these events itself. Refer to Script tag to stop or start each one.

EventWhenDefault
page.viewedThe page loads, and each route change in a single page appOn
form.submittedA visitor submits a formOn
link.clickedA visitor clicks a link to a different siteOn
file.downloadedA visitor clicks a link to a fileOn
element.clickedA visitor clicks an element that is not a link to a different site or to a fileOn
scroll.reachedThe visitor scrolls to 25, 50, 75 and 100 percent of the pageOn
The event value of a dataLayer pushYour site or GTM pushes an object with an event keyOn
{vendor}.{action}An adapter receives an event from a vendor toolOn. Refer to Adapters.

Properties ​

page.viewed ​

PropertyDescription
urlThe full address of the page
pathThe path of the page
titleThe title of the page
referrerThe address of the previous page

form.submitted ​

PropertyDescription
formIdThe id of the form
formNameThe name of the form
actionThe action address of the form
pageThe address of the page
_detectedThe field of each identifier that the SDK found, for example { "email": "work_email" }
companyThe name of the company
titleThe job title of the person
countryThe country
firstNameThe first name of the person
lastNameThe last name of the person
companySizeThe number of employees of the company

The SDK finds the identifier fields from the autocomplete value, the input type, the name, the id, the label and the placeholder, in this order. It knows the words in English and in the Nordic and EU languages. It accepts a value only when the value is valid, for example an organization number with a correct check digit. The key of _detected is the identifier name and the value is the field name.

The SDK reads the value of a field only after the visitor grants the analytics purpose. Before that, the event has the form data and an empty _detected. The SDK sends identifiers only after consent.

FieldThe SDK sends it as
Email, phone, a profile on LinkedIn, X, Instagram, GitHub, TikTok or YouTubeAn identify call
Company website, organization number, VAT number, LinkedIn companyAn account call
Company name, job title, country, first name, last name, company sizeProperties of form.submitted
All other fieldsNothing. Add a field with data-lg-capture.

The SDK never sends a textarea, a password field, a one-time code field, a payment field, a hidden field or a personal identity number.

PropertyDescription
element.hrefThe link address
element.textThe text of the link

file.downloaded ​

PropertyDescription
element.hrefThe file address
element.textThe text of the link
extensionThe file extension, for example pdf

element.clicked ​

The event has the property element, with the same keys as in Data attributes:

PropertyDescription
element.tagThe tag name
element.textThe first 100 characters of the text
element.hrefThe link address, if the element has one
element.idThe id of the element, if it has one
sampleThe part of the sessions that send this event, for example 0.1

Only a sample of the sessions sends element.clicked. The SDK selects 10% of the sessions by default. Set a different part with data-sample-clicks. To get the real number of clicks, divide a count by the value of sample. A rule that counts element.clicked sees only the sample.

Position of a click ​

link.clicked, file.downloaded and element.clicked also have these properties. A heatmap uses them.

PropertyDescription
element.selectorA CSS path to the element, from the nearest ancestor with an id. It has no class names.
element.x, element.yThe point of the click in the element, from 0 to 1
point.x, point.yThe point of the click in the page, in CSS pixels
viewport.width, viewport.heightThe size of the browser window, in CSS pixels
document.width, document.heightThe size of the page, in CSS pixels

Clicks ​

One click sends one automatic event only:

ClickEvent
A link to a filefile.downloaded
A link to a different sitelink.clicked
All other elementselement.clicked

scroll.reached ​

PropertyDescription
percent25, 50, 75 or 100

GTM dataLayer ​

Each dataLayer push with an event key becomes an event with the same name in lowercase. The other keys of the push become properties.

js
dataLayer.push({ event: 'generate_lead', form: 'contact', value: 1 });

The SDK sends generate_lead with the properties form and value. It ignores the GTM events gtm.js, gtm.dom and gtm.load, and each key that starts with gtm..

The options datalayerInclude and datalayerExclude select the event names. An entry with a configured email key or user ID key sends an identify when the site grants analytics. Refer to Use the dataLayer.

Data on each event ​

Each event has these values:

ValueDescription
context.pageThe address, the referrer and the title of the page
UTM valuesThe five utm_ values from the first page of the session
clickIdsThe ad click IDs from the first page of the session, for example gclid. Only after consent for analytics and ads.
IdentifiersThe visitor ID after consent, and the identifiers from identify