
Écran Large integrates a tracking script on its article
The code handles click tracking, link disabling, and page restoration after the modal is closed.
The video this brief is aboutA JavaScript script controls the modal window and link tracking on the Écran Large page. It detects clicks on the “cta” button, sends a tracking event named “google_preferred_source_click” with the URL, link text and domain. If no destination is set, the button becomes inactive and its title indicates the lack of a URL. The script saves the scroll position, the body and HTML styles, then restores them when the modal closes. The close function also resets focus to the previously active element. according to Écran Large.