Page and screen views
Page and screen view tracking is key for understanding your users' navigation within your app.
Snowplow provides implementations for web and mobile platforms:
- Page view events on web
- Screen view events on mobile
Both page and screen views are included in the Snowplow Unified Digital dbt package. The legacy Web and Mobile packages handle page and screen views respectively.
Page views
Track page views to record when a user views a web page.
Page view events are baked-in events that have no schema. They populate the page atomic event parameters.
This table shows the support for page view tracking across the main Snowplow tracker SDKs.
| Tracker | Supported | Since version | Auto-tracking | Notes |
|---|---|---|---|---|
| Web | ✅ | 0.1.0 | ✅/❌ | Web page entity can be automatically added |
| iOS | ❌ | |||
| Android | ❌ | |||
| React Native | ✅ | 0.1.0 | ❌ | No web page entity |
| Flutter | ✅ | 0.1.0 | ✅/❌ | Only on web; web page entity can be automatically added |
| Roku | ❌ | |||
| Node.js | ❌ | |||
| Golang | ❌ | |||
| .NET | ❌ | |||
| Java | ✅ | 0.1.0 | ❌ | No web page entity |
| Python | ✅ | 0.1.0 | ❌ | No web page entity |
| Scala | ❌ | |||
| Ruby | ✅ | 0.1.0 | ❌ | No web page entity |
| Rust | ❌ | |||
| PHP | ❌ | |||
| C++ | ❌ | |||
| Unity | ❌ | |||
| Lua | ❌ | |||
| Google Tag Manager | ✅ | v3 | ❌ |
We recommend using the Base web tracking plan template for web tracking. It includes page views.
Web page entity
Some trackers assign a unique identifier to every page load: the page view ID. Where available, you can configure this UUID to be added to every event tracked on that page, by tracking the web_page entity. This identifier can be very useful for sessionization and user journey analysis.
web_page
EntityExample
{
"id": "024629F0-6B9B-440C-82D4-DB3CF9D31533"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
idstring | Required. |
{
"description": "Schema for a web page context",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "web_page",
"format": "jsonschema",
"version": "1-0-0"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}
Screen views
Screen view events are the mobile equivalent of page view events.
This table shows the support for screen view tracking across the main Snowplow tracker SDKs.
| Tracker | Supported | Since version | Auto-tracking | Notes |
|---|---|---|---|---|
| Web | ✅ | 4.2.0 | ✅/❌ | Requires screen tracking plugin; we recommend using page views instead |
| iOS | ✅ | 0.1.0 | ✅/❌ | Screen entity can be automatically added; screen view autotracking depends on platform |
| Android | ✅ | 0.1.0 | ✅/❌ | Screen entity can be automatically added; screen view autotracking depends on platform |
| React Native | ✅ | 0.1.0 | ✅/❌ | Screen entity can be automatically added; add navigation handler for screen view autotracking |
| Flutter | ✅ | 0.1.0 | ❌ | No screen entity |
| Roku | ✅ | 0.1.0 | ❌ | No screen entity |
| Node.js | ✅ | 0.1.0 | ❌ | No screen entity |
| Golang | ✅ | 1.0.0 | ❌ | No screen entity |
| .NET | ✅ | 1.3.0 | No screen entity | |
| Java | ✅ | 0.1.0 | ❌ | No screen entity |
| Python | ✅ | 0.2.0 | ❌ | No screen entity |
| Scala | ❌ | |||
| Ruby | ✅ | 0.2.0 | ❌ | No screen entity |
| Rust | ✅ | 0.1.0 | ❌ | No screen entity |
| PHP | ✅ | 0.1.0 | ❌ | No screen entity |
| C++ | ✅ | 0.1.0 | ❌ | No screen entity |
| Unity | ✅ | 0.8.0 | ❌ | No screen entity |
| Lua | ✅ | 0.1.0 | ❌ | No screen entity |
| Google Tag Manager | ❌ |
We recommend using the Base mobile tracking plan template for mobile tracking. It includes screen views.
Screen view events record the name and identifier of the current screen, as well as some optional properties such as the ID of the previous screen. Information about the previous screen can be useful for understanding user navigation within your application.
screen_view
EventExample
{
"name": "Screen 2",
"type": "feed",
"id": "024629F0-6B9B-440C-82D4-DB3CF9D31533",
"previousName": "Screen 1",
"previousId": "86ffd23c-b844-4ed4-aae9-7796b8b6f1e4",
"previousType": "feed",
"transitionType": "push"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
namestring | Required. The name of the screen viewed. |
typestring | Optional. The type of screen that was viewed e.g feed / carousel. |
idstring | Required. An ID from the associated screenview event. |
previousNamestring | Optional. The name of the previous screen. |
previousIdstring | Optional. A screenview ID of the previous screenview. |
previousTypestring | Optional. The screen type of the previous screenview. |
transitionTypestring | Optional. The type of transition that led to the screen being viewed. |
{
"description": "Schema for a screen view event",
"properties": {
"name": {
"type": "string",
"description": "The name of the screen viewed."
},
"type": {
"type": "string",
"description": "The type of screen that was viewed e.g feed / carousel."
},
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"description": "An ID from the associated screenview event."
},
"previousName": {
"type": "string",
"description": "The name of the previous screen."
},
"previousId": {
"type": "string",
"format": "uuid",
"description": "A screenview ID of the previous screenview."
},
"previousType": {
"type": "string",
"description": "The screen type of the previous screenview."
},
"transitionType": {
"type": "string",
"description": "The type of transition that led to the screen being viewed."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"id"
],
"minProperties": 2,
"self": {
"vendor": "com.snowplowanalytics.mobile",
"name": "screen_view",
"format": "jsonschema",
"version": "1-0-0"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
select
unstruct_event_com_snowplowanalytics_mobile_screen_view_1 screen_view_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'screen_view'
and events.event_vendor = 'com.snowplowanalytics.mobile'
select
unstruct_event_com_snowplowanalytics_mobile_screen_view_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'screen_view'
and events.event_vendor = 'com.snowplowanalytics.mobile'
select
unstruct_event_com_snowplowanalytics_mobile_screen_view_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'screen_view'
and events.event_vendor = 'com.snowplowanalytics.mobile'
and unstruct_event_com_snowplowanalytics_mobile_screen_view_1 is not null
select
"screen_view_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_mobile_screen_view_1 "screen_view_1"
on "screen_view_1".root_id = events.event_id and "screen_view_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "screen_view_1".root_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'screen_view'
and events.event_vendor = 'com.snowplowanalytics.mobile'
Screen entity
Some trackers can automatically attach a screen entity to all events after a screen view is tracked. This entity contains information about the current, or last seen, screen.
screen
EntityExample
{
"name": "Screen 2",
"type": "feed",
"id": "024629F0-6B9B-440C-82D4-DB3CF9D31533"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
namestring | Required. The name of the screen viewed. |
typestring | Optional. The type of screen that was viewed e.g feed / carousel. |
idstring | Required. An ID from the associated screenview event. |
viewControllerstring | Optional. iOS specific: class name of the view controller. |
topViewControllerstring | Optional. iOS specific: class name of the top level view controller. |
activitystring | Optional. Android specific: name of activity. |
fragmentstring | Optional. Android specific: name of fragment. |
{
"description": "Schema for a context that represents information pertaining to the current screen being viewed when an event occurs.",
"properties": {
"name": {
"type": "string",
"description": "The name of the screen viewed."
},
"type": {
"type": "string",
"description": "The type of screen that was viewed e.g feed / carousel."
},
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"description": "An ID from the associated screenview event."
},
"viewController": {
"type": "string",
"description": "iOS specific: class name of the view controller."
},
"topViewController": {
"type": "string",
"description": "iOS specific: class name of the top level view controller."
},
"activity": {
"type": "string",
"description": "Android specific: name of activity."
},
"fragment": {
"type": "string",
"description": "Android specific: name of fragment."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"id"
],
"minProperties": 2,
"self": {
"vendor": "com.snowplowanalytics.mobile",
"name": "screen",
"format": "jsonschema",
"version": "1-0-0"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}