TagSpy

user_engagement

Automaticapp, web

Automatically triggered when the app is in the foreground or webpage is in focus for at least one second. Learn more

Platforms
app, web
When it fires
Collected automatically; no code needed.
Official docs

Parameters (1)

ParameterTypeRequiredDescriptionExample
engagement_time_msec--The additional engagement time (ms) since the last user_engagement event-

Example

gtag.js
gtag('event', 'user_engagement', {
  engagement_time_msec: '...',
});
GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'user_engagement',
  engagement_time_msec: '...',
});

Also see