user_engagement
Automaticapp, webAutomatically 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.
Parameters (1)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| 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: '...',
});