screen_view
RecommendedThis event signifies a screen view. Use this when a screen transition occurs. This event can be logged irrespective of whether automatic screen tracking is enabled.
- Platforms
- web, app
- When it fires
- You send it when the action happens.
Parameters (9)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| screen_class | string | No | Current screen class, such as the class name of the Activity, logged with screen_view event and added to every event. | MainActivity |
| screen_name | string | No | Current screen name, such as the name of the Activity, logged with screen_view event and added to every event. | Splash Screen |
| firebase_screen | - | - | Current screen name, such as the name of the Activity, logged with screen_view event and added to every event. | - |
| firebase_screen_id | - | - | Displays the ID of the screen the user was on | - |
| firebase_screen_class | - | - | Provides the class name of the screen on which the user was on | - |
| firebase_previous_screen | - | - | Previous screen name | - |
| firebase_previous_class | - | - | Previous screen class | - |
| firebase_previous_id | - | - | Previous screen id | - |
| engagement_time_msec | - | - | The additional engagement time (ms) since the last user_engagement event | - |
Example
gtag.js
gtag('event', 'screen_view', {
screen_class: 'MainActivity',
screen_name: 'Splash Screen',
firebase_screen: '...',
firebase_screen_id: '...',
});GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'screen_view',
screen_class: 'MainActivity',
screen_name: 'Splash Screen',
firebase_screen: '...',
firebase_screen_id: '...',
});