·

Écran Large adds a tracking script to links

The site inserts code to track clicks and manage the display of a dialog box.

Écran Large adds a tracking script to linksThe video this brief is about

A JavaScript script is injected into the page. It retrieves the `dialog` and `.cta` elements, then defines a `trackClick` function that, depending on the event type, sends a tracking signal with the URL, link text, and domain. If no destination is provided, the button becomes inactive and receives a warning title. A logo is loaded dynamically if a URL is available. The code saves the scroll state, the body and page styles, then restores everything when the dialog box is closed. Source: Écran Large