Skip to main content

Page and screen engagement

Page or screen activity (engagement) tracking enables you to measure the time users spent engaged on a page or screen and the extent of the page/screen they viewed. There are two mechanisms that the activity tracking is implemented:

  1. Using page ping events on Web.
  2. Using the screen summary entity on mobile.

On Web using page ping events

Page pings are used to record users engaging with content on a web page after it has originally loaded. For example, it can be used to track how far down an article a user scrolls.

If enabled, the activity tracking function checks for engagement with a page after load. (E.g. mousemovement, scrolling etc...).

Page pings are identified by e=pp. As well as all the standard web fields, there are four additional fields that pp includes, which are used to identify how users are scrolling over web pages:

Atomic Table ColumnTypeDescription
pp_xoffset_minintegerMinimum page x offset seen in the last ping period
pp_xoffset_maxintegerMaximum page x offset seen in the last ping period
pp_yoffset_minintegerMinimum page y offset seen in the last ping period
pp_yoffset_maxintegerMaximum page y offset seen in the last ping period

On mobile

note

Screen engagement tracking is available for native Android and iOS apps starting with version 6 of the trackers.

Screen engagement information is tracked on our mobile trackers in the screen_summary context entity. The entity is tracked along with these events:

  1. application_foreground and application_background events (see lifecycle events).
  2. screen_end event (see below).

Screen summary entity

Entity that contains the screen engagement information.

Context entity: screen_summary

Schema for an entity tracked with foreground/background/screen_end events with summary statistics about the screen view

Schema URI: iglu://com.snowplowanalytics.mobile/screen_summary/jsonschema/1-0-0

WebMobileTracked automatically
👀 Example
{
"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
}
📃 Schema properties definition
PropertyTypeDescriptionRequired?
foreground_sec"number"Time in seconds spent on the current screen while the app was in foreground
background_sec["number","null"]Time in seconds spent on the current screen while the app was in background
last_item_index["integer","null"]Index of the last viewed item in the list on the screen
items_count["integer","null"]Total number of items in the list on the screen
min_x_offset["integer","null"]Minimum horizontal scroll offset on the scroll view in pixels
max_x_offset["integer","null"]Maximum horizontal scroll offset on the scroll view in pixels
min_y_offset["integer","null"]Minimum vertical scroll offset on the scroll view in pixels
max_y_offset["integer","null"]Maximum vertical scroll offset on the scroll view in pixels
content_width["integer","null"]Width of the scroll view in pixels
content_height["integer","null"]Height of the scroll view in pixels

Screen end event

This event is tracked automatically by the mobile trackers just before the transition to the next screen.

The event has no properties.

Event: screen_end

Schema for an event tracked before transitioning to a new screen

Schema URI: iglu://com.snowplowanalytics.mobile/screen_end/jsonschema/1-0-0

WebMobileTracked automatically
📃 Schema properties definition
PropertyTypeDescriptionRequired?
❓ How to query the event in the warehouse?
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'

How to track

To track page activity on Web, see the activity tracking documentation.

To track screen engagement on mobile, see the screen engagement documentation.

Use in modeling

Page and screen activity events are used by our Snowplow Unified Package (starting from version 0.2.0) to calculate page engagement metrics. The Snowplow Web Package can process page ping events.

Was this page helpful?