Skip to main content

Page and screen views

Page and screen view events are important events for tracking the navigation within your app. Page views are tracked on Web and screen views on mobile.

Page view events

Page view tracking is used to record views of web pages.

Under the hood, the page view events are not self-describing events but standard events with the event type pv. The tracked information includes the page URL and title. You can see an overview of the page fields in the atomic events table here.

Additionally, the page view is assigned an identifier – the page view ID. This is tracked in the web_page context entity in that page view event and for all events on that page.

web_page

Entity
Schema for a web page context
Schema URIiglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0
Tracker compatibility
Web: Mobile: Tracked automatically:
Example
{
"id": "024629F0-6B9B-440C-82D4-DB3CF9D31533"
}
Schema
PropertyDescription
id
string
Required.

How to track?

See the documentation for the JavaScript tracker to learn how to track a page view event.

Screen view events

Screen view events are the equivalent of the page view events for mobile apps. In contrast with page view events, screen view events are self-describing events.

screen_view

Event
Schema for a screen view event
Schema URIiglu:com.snowplowanalytics.mobile/screen_view/jsonschema/1-0-0
Tracker compatibility
Web: Mobile: Tracked automatically: Depends on the app framework
Example
{
"name": "Screen 2",
"type": "feed",
"id": "024629F0-6B9B-440C-82D4-DB3CF9D31533",
"previousName": "Screen 1",
"previousId": "86ffd23c-b844-4ed4-aae9-7796b8b6f1e4",
"previousType": "feed",
"transitionType": "push"
}
Schema
PropertyDescription
name
string
Required. The name of the screen viewed.
type
string
Optional. The type of screen that was viewed e.g feed / carousel.
id
string
Required. An ID from the associated screenview event.
previousName
string
Optional. The name of the previous screen.
previousId
string
Optional. A screenview ID of the previous screenview.
previousType
string
Optional. The screen type of the previous screenview.
transitionType
string
Optional. The type of transition that led to the screen being viewed.
Warehouse query
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'

After a screen view event is tracked, the tracker attaches a screen context entity to all the events tracked by the tracker reporting the last (and probably current) screen visible on device when the event was tracked.

screen

Entity
Schema for a context that represents information pertaining to the current screen being viewed when an event occurs.
Schema URIiglu:com.snowplowanalytics.mobile/screen/jsonschema/1-0-0
Tracker compatibility
Web: Mobile: Tracked automatically:
Example
{
"name": "Screen 2",
"type": "feed",
"id": "024629F0-6B9B-440C-82D4-DB3CF9D31533"
}
Schema
PropertyDescription
name
string
Required. The name of the screen viewed.
type
string
Optional. The type of screen that was viewed e.g feed / carousel.
id
string
Required. An ID from the associated screenview event.
viewController
string
Optional. iOS specific: class name of the view controller.
topViewController
string
Optional. iOS specific: class name of the top level view controller.
activity
string
Optional. Android specific: name of activity.
fragment
string
Optional. Android specific: name of fragment.

How to track?

Use in modeling

Page and screen view events are used by our dbt packages to model web and mobile data. The Snowplow Web Package as well as the Snowplow Mobile Package use them to provided aggregated page and screen tables.