Skip to main content

Page and screen engagement

Activity or engagement tracking enables you to measure the time a user spent engaged on a page or screen, and the extent of the page or screen they viewed.

Snowplow provides implementations for web and mobile platforms:

  • Page ping events on web
  • Screen summary entity on mobile

Both page and screen activity tracking are included in the Snowplow Unified Digital package to calculate engagement metrics. The legacy Web package handles page pings as well.

Page engagement

Page ping events record users engaging with content on a web page after it has initially loaded. This includes scroll position.

Where activity autotracking is available, you can configure your tracker to send page ping events at regular intervals. They're considered a type of "heartbeat" event that indicates the user is still present and engaging with the page.

Page ping events are baked-in events that have no schema. They populate the page offset atomic event parameters.

This table shows the support for page ping tracking across the main client-side Snowplow tracker SDKs. Python is the only server-side tracker that provides page ping events.

TrackerSupportedSince versionAuto-trackingNotes
Web0.10.0
iOS
Android
React Native
Flutter0.1.0Only on web
Roku
Python0.8.0Detect activity and track manually
Google Tag Managerv3

We recommend using the Base web tracking plan template for web tracking. It includes page pings.

Screen engagement

Use screen engagement tracking to track a screen_end event when a user navigates away from a screen.

The trackers can also track a screen_summary entity that contains screen engagement data. This entity is sent along with lifecycle and screen_end events.

This table shows the support for screen engagement tracking across the main client-side Snowplow tracker SDKs. The server-side trackers don't include screen engagement tracking.

TrackerSupportedSince versionAuto-trackingNotes
Web4.2.0✅/❌Requires screen tracking plugin
iOS6.0.0
Android6.0.0
React Native2.1.0Only on mobile
Flutter0.1.0Only on mobile
Roku
Google Tag Manager

We recommend using the Base mobile tracking plan template for mobile tracking. It includes screen end events.

Screen end event

This event can be tracked automatically just before the transition to the next screen, based on the firing of the next screen view event. It has no properties.

screen_end

Event
Schema for an event tracked before transitioning to a new screen
Schema URIiglu:com.snowplowanalytics.mobile/screen_end/jsonschema/1-0-0
Properties and schema

This schema has no properties.

Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_mobile_screen_end_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_end'
and events.event_vendor = 'com.snowplowanalytics.mobile'

List item view event

Track this event to mark which items are visible in a list. When screen engagement tracking is enabled, this event won't be sent to the Collector but used to update the tracker state for the screen summary entity.

If you're using the iOS tracker with SwiftUI, you can configure it to automatically track this event.

list_item_view

Event
Schema for an event tracked when an item is displayed in a list
Schema URIiglu:com.snowplowanalytics.mobile/list_item_view/jsonschema/1-0-0
Example
json
{
"index": 3,
"items_count": 10
}
Properties and schema
PropertyDescription
index
integer
Required. Index of the item in a list on the screen
items_count
integer
Optional. Total number of items in a list on the screen
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_mobile_list_item_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 = 'list_item_view'
and events.event_vendor = 'com.snowplowanalytics.mobile'

Scroll changed event

Track this event to mark changes in scroll position on a screen. When screen engagement tracking is enabled, this event won't be sent to the Collector but used to update the tracker state for the screen summary entity.

scroll_changed

Event
Schema for an event tracked when a scroll view's scroll position changes
Schema URIiglu:com.snowplowanalytics.mobile/scroll_changed/jsonschema/1-0-0
Example
json
{
"x_offset": 0,
"y_offset": 250,
"view_width": 375,
"view_height": 667,
"content_width": 375,
"content_height": 1500
}
Properties and schema
PropertyDescription
x_offset
integer
Optional. Horizontal scroll offset in pixels
y_offset
integer
Optional. Vertical scroll offset in pixels
view_width
integer
Optional. The width of the scroll view in pixels
view_height
integer
Optional. The height of the scroll view in pixels
content_width
integer
Optional. The width of the content in the scroll view in pixels
content_height
integer
Optional. The height of the content in the scroll view in pixels
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_mobile_scroll_changed_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 = 'scroll_changed'
and events.event_vendor = 'com.snowplowanalytics.mobile'

Screen summary entity

Entity that contains screen engagement information, including how long a user spends on a screen in the foreground and background, as well as information about scroll depth and list items.

The entity data is based on tracker state captured from lifecycle, list item view, and scroll changed events.

screen_summary

Entity
Schema for an entity tracked with foreground/background/screen_end events with summary statistics about the screen view
Schema URIiglu:com.snowplowanalytics.mobile/screen_summary/jsonschema/1-0-0
Example
json
{
"foreground_sec": 10.2,
"background_sec": 3.1,
"last_item_index": 11,
"items_count": 50,
"min_x_offset": 0,
"max_x_offset": 400,
"min_y_offset": 0,
"max_y_offset": 1000,
"content_width": 400,
"content_height": 5000
}
Properties and schema
PropertyDescription
foreground_sec
number
Required. Time in seconds spent on the current screen while the app was in foreground
background_sec
number
Optional. Time in seconds spent on the current screen while the app was in background
last_item_index
integer
Optional. Index of the last viewed item in the list on the screen
items_count
integer
Optional. Total number of items in the list on the screen
min_x_offset
integer
Optional. Minimum horizontal scroll offset on the scroll view in pixels
max_x_offset
integer
Optional. Maximum horizontal scroll offset on the scroll view in pixels
min_y_offset
integer
Optional. Minimum vertical scroll offset on the scroll view in pixels
max_y_offset
integer
Optional. Maximum vertical scroll offset on the scroll view in pixels
content_width
integer
Optional. Width of the scroll view in pixels
content_height
integer
Optional. Height of the scroll view in pixels