Event tracking in Maglr publications
Maglr tracks what visitors do in your content, such as clicking links, downloading files, submitting forms and playing videos. Each tracked interaction is called an event. Events are tracked in publications, single pages and embeds, and you can see them in Maglr statistics, Google Analytics 4 and Google Tag Manager.
Where tracked events are available
Maglr sends each event to up to three places:
- Maglr statistics: on by default, with no setup needed. Events show in the dashboard statistics. Maglr statistics can be switched off per domain, under "Statistics & integration", with the Activate standard Maglr statistics setting.
- Google Analytics 4: when you integrate Google Analytics, events inside a page are sent to GA4. Events in the navigation environment are available in Maglr statistics and in the Google Tag Manager dataLayer.
- Google Tag Manager: when you integrate Google Tag Manager, all events are added to the dataLayer. To use them in Google Analytics, configure Analytics with the GTM dataLayer.
Google Analytics and Google Tag Manager are connected per domain, under "Statistics & integration", with the Google Analytics or GTM setting.
Events tracked inside a page
Maglr tracks these interactions inside a page of a publication, single page or embed:
- Opening another layer or element within the page
- Clicking an internal or external link
- Downloading a file through a link
- Clicking a link that scrolls to another element on the page
- Opening or closing a popup
- How far the visitor scrolls down the page (scroll depth)
- Starting a video (manual play only; autoplay videos are not counted)
- Playing, stopping or finishing an audio fragment
- Submitting a form
- Moving through a slideshow
- Interactions inside embedded content that sends its own events
Events tracked in the navigation environment
The navigation environment is everything around the pages of a publication: the menu, the overview and the side menu. It exists in publications only. Maglr tracks these interactions in it:
- Going to the overview
- Opening a category on the overview
- Opening the side menu or one of its tabs
- Searching within the publication, including the search term used
- Sharing the publication
- Switching languages
- Signing up for the newsletter in the side menu
- Submitting the contact form in the side menu
- Downloading the PDF version, when the PDF download tab is enabled in the side menu
- Clicking the logo
- Accepting or rejecting the cookie consent
- Opening, closing and submitting gated content overlays
Event structure: category, action and label
Every Maglr event has three parts: a category, an action and a label. Maglr statistics and the Google Tag Manager dataLayer use this structure.
Category
The category groups events about the same kind of object, such as Video, Link, Popup or Form. In the dashboard statistics, the category is shown in the Event column.
Action
The action names what the visitor did with the object. One category can have several actions. For example, the Audio category has the actions Play, Stop and End, and the Link category has actions such as Internal, External and File.
Label
The label adds detail about the specific event, such as the name of the element, the URL of a link or the source, video ID and element name of a YouTube or Vimeo video.
Events in Google Analytics 4
In Google Analytics 4, a Maglr event's category is the event name (for example Video). The action and label are sent as event parameters called action and label, together with parameters such as element_name and element_id. GA4 only shows custom event parameters in reports after you register them as custom dimensions in Google Analytics.
Event data in the Google Tag Manager dataLayer
With Google Tag Manager, Maglr adds each event to the dataLayer with the event name and the category, action and label, each prefixed with maglr. Events inside a page use the event name maglrUserEvent. Events in the navigation environment use maglrInterfaceEvent. In publications, page views use maglrPageView for the first page and maglrVirtualPageView for each following page.
For example, a visitor who plays a YouTube video on a single page adds this to the dataLayer:
- event:
maglrUserEvent - maglrCategory:
Video - maglrAction:
Play - maglrLabel:
youtube-JD3SD-Testplayer
In publications, the label of an event inside a page also ends with the project ID and page ID, for example youtube-JD3SD-Testplayer :: (1234|5678).
For all events and dataLayer variables, see the full event reference for developers (Google Doc).
Frequently asked questions
Why don't I see navigation menu events in Google Analytics 4?
With a direct Google Analytics 4 integration, Maglr sends events inside a page to GA4. Events in the navigation environment, such as opening the side menu, searching or switching languages, are available in Maglr statistics and in the Google Tag Manager dataLayer. To get them into Google Analytics, integrate Google Tag Manager and configure Analytics with the GTM dataLayer.
Does cookie consent affect event tracking?
Yes. The cookie consent mode you choose decides what is tracked before a visitor accepts:
- Light mode: Maglr statistics are measured, and Google Analytics runs anonymously until the visitor accepts.
- Strict mode: neither Google Analytics nor Maglr statistics are measured until the visitor accepts. Events are still added to the Google Tag Manager dataLayer; your GTM setup decides what happens with them.
- Manual mode: Maglr statistics are not measured until your own cookie consent tells Maglr the visitor has accepted.
For the settings, see Configure cookie consent.
Are pausing and stopping a video tracked?
No. For videos, Maglr tracks only the first time a visitor starts a video manually, as a Video event with the action Play. Pausing, stopping and muting are not tracked, and videos that play automatically do not send an event.
Updated on: 20/10/2026