Skip to main content

Page element tracking

Page element tracking captures user interactions with specific elements on your web pages, including buttons, forms, and any other visible components.

Use page element tracking to:

  • Measure button click engagement across your site
  • Track form interactions including focus, changes, and submissions
  • Understand which page sections users actually see
  • Build funnel analysis based on element visibility and interactions
  • Measure content consumption and scroll depth

Button clicks

Button click tracking automatically captures clicks on <button> and <input type="button"> elements.

This table shows the support for button click tracking across the main client-side Snowplow tracker SDKs:

TrackerSupportedSince versionAuto-trackingNotes
Web3.18.0Requires button click plugin
iOS
Android
React Native
Flutter
Roku
Google Tag Managerv4Integrates with button click plugin

We recommend using the Base web data product template for web tracking. It includes button clicks.

button_click

Event
Schema for a button click event
Schema URIiglu:com.snowplowanalytics.snowplow/button_click/jsonschema/1-0-0
Example
json
{
"label": "Submit",
"id": "submit-btn",
"classes": [
"btn",
"btn-primary"
],
"name": "submit"
}
Properties and schema
PropertyDescription
label
string
Required. The text on the button, or a user-provided override
id
string
Optional. The ID of the button
classes
array
Optional. The classes of the button
name
string
Optional. The name attribute of the button
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_button_click_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 = 'button_click'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Form interactions

Form tracking captures three types of events: when a user focuses on a form field, when a field value changes, and when a form is submitted.

This table shows the support for form tracking across the main client-side Snowplow tracker SDKs:

TrackerSupportedSince versionAuto-trackingNotes
Web2.1.0 (directly), 3.0.0 (as plugin)Requires form tracking plugin
iOS
Android
React Native
Flutter
Roku
PythonThe Python tracker has deprecated form tracking APIs; use custom events with form schemas instead
Google Tag Managerv3Integrates with form tracking plugin

Focus form event

Triggered when a user focuses on a form field.

focus_form

Event
Schema for a form field focus event
Schema URIiglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0
Example
json
{
"formId": "contact-form",
"elementId": "email",
"nodeName": "INPUT",
"elementType": "email",
"elementClasses": [
"form-control"
],
"value": ""
}
Properties and schema
PropertyDescription
formId
string
Required. The ID of the form
elementId
string
Optional. The ID of the element
nodeName
string
Required. The node name of the element
Must be one of: INPUT, TEXTAREA, SELECT
elementType
string
Optional. The type of the element
elementClasses
array
Required. The classes of the element
value
string
Optional. The value of the element
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_focus_form_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 = 'focus_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Change form event

Triggered when a user changes the value of a form field.

change_form

Event
Schema for a form field change event
Schema URIiglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0
Example
json
{
"formId": "contact-form",
"elementId": "email",
"nodeName": "INPUT",
"elementType": "email",
"elementClasses": [
"form-control"
],
"value": "user@example.com"
}
Properties and schema
PropertyDescription
formId
string
Required. The ID of the form
elementId
string
Optional. The ID of the element
nodeName
string
Required. The node name of the element
Must be one of: INPUT, TEXTAREA, SELECT
elementType
string
Optional. The type of the element
elementClasses
array
Required. The classes of the element
value
string
Required. The value of the element
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_change_form_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 = 'change_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Submit form event

Triggered when a user submits a form. Contains data about all form fields.

submit_form

Event
Schema for a form submission event
Schema URIiglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0
Example
json
{
"formId": "contact-form",
"formClasses": [
"contact-form",
"validated"
],
"elements": [
{
"name": "email",
"value": "user@example.com",
"nodeName": "INPUT",
"type": "email"
},
{
"name": "message",
"value": "Hello",
"nodeName": "TEXTAREA",
"type": null
}
]
}
Properties and schema
PropertyDescription
formId
string
Required. The ID of the form
formClasses
array
Required. The classes of the form
elements
array
Required. The form elements and their values
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_submit_form_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 = 'submit_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Page element visibility and lifecycle

Element tracking enables declarative tracking of page elements as they are created, become visible, leave view, or are removed from the page. It's only available for web.

This table shows the support for page element tracking across the main client-side Snowplow tracker SDKs:

TrackerSupportedSince versionAuto-tracking
Web4.6.0
iOS
Android
React Native
Flutter
Roku
Google Tag Manager

Available events

The element tracking plugin generates four event types:

  • create_element: when a matching element is added to the page
  • expose_element: when a matching element scrolls into view
  • obscure_element: when a matching element scrolls out of view
  • destroy_element: when a matching element is removed from the page

Create element:

create_element

Event
Event that fires when an element matching a named configuration is detected as existing in or being added to a document.
Schema URIiglu:com.snowplowanalytics.snowplow/create_element/jsonschema/1-0-0
Example
json
{
"element_name": "newsletter signup"
}
Properties and schema
PropertyDescription
element_name
string
Required. The name of the element that was created. Should match the element name field in entities that describe this particular element.
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_create_element_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 = 'create_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Expose element:

expose_element

Event
Event that fires when an element matching a named configuration is detected as intersecting with the viewport, becoming visible to the user.
Schema URIiglu:com.snowplowanalytics.snowplow/expose_element/jsonschema/1-0-0
Example
json
{
"element_name": "newsletter signup"
}
Properties and schema
PropertyDescription
element_name
string
Required. The name of the element that was exposed. Should match the element name field in entities that describe this particular element.
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_expose_element_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 = 'expose_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Obscure element:

obscure_element

Event
Event that fires when an element matching a named configuration is detected as becoming hidden from a user or moving out of the viewport.
Schema URIiglu:com.snowplowanalytics.snowplow/obscure_element/jsonschema/1-0-0
Example
json
{
"element_name": "newsletter signup"
}
Properties and schema
PropertyDescription
element_name
string
Required. The name of the element that was obscured. Should match the element name field in entities that describe this particular element.
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_obscure_element_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 = 'obscure_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Destroy element:

destroy_element

Event
Event that fires when an element matching a named configuration is detected as being removed from a document.
Schema URIiglu:com.snowplowanalytics.snowplow/destroy_element/jsonschema/1-0-0
Example
json
{
"element_name": "newsletter signup"
}
Properties and schema
PropertyDescription
element_name
string
Required. The name of the element that was destroyed. Should match the element name field in entities that describe this particular element.
Warehouse query
sql
select
unstruct_event_com_snowplowanalytics_snowplow_destroy_element_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 = 'destroy_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'

Available entities

All element events include an element entity with information about the tracked element.

element

Entity
Schema for element context
Schema URIiglu:com.snowplowanalytics.snowplow/element/jsonschema/1-0-0
Example
json
{
"element_name": "newsletter signup",
"width": 560,
"height": 137,
"position_x": 320,
"position_y": 1953.5,
"doc_position_x": 320,
"doc_position_y": 5392.5,
"element_index": 2,
"element_matches": 2,
"originating_page_view": "02e30714-a84a-42f8-8b07-df106d669db0",
"attributes": []
}
Properties and schema
PropertyDescription
element_name
string
Required. The name of the element
width
number
Optional. The width of the element
height
number
Optional. The height of the element
position_x
number
Optional. The x position of the element in the viewport
position_y
number
Optional. The y position of the element in the viewport
doc_position_x
number
Optional. The x position of the element in the document
doc_position_y
number
Optional. The y position of the element in the document
element_index
integer
Optional. The index of this element among all matching elements
element_matches
integer
Optional. The total number of elements matching the rule
originating_page_view
string
Optional. The page view ID when the element was first observed
attributes
array
Optional. Custom attributes extracted from the element

You can optionally configure the tracker to attach element statistics to any event type, providing information about element visibility and scroll depth, using the element_statistics entity.

element_statistics

Entity
Schema for element statistics
Schema URIiglu:com.snowplowanalytics.snowplow/element_statistics/jsonschema/1-0-0
Example
json
{
"element_name": "blog content",
"element_index": 1,
"element_matches": 1,
"current_state": "unknown",
"min_size": "800x3928",
"current_size": "800x3928",
"max_size": "800x3928",
"y_depth_ratio": 0.203,
"max_y_depth_ratio": 0.493,
"max_y_depth": "1937/3928",
"element_age_ms": 298379,
"times_in_view": 0,
"total_time_visible_ms": 0
}
Properties and schema
PropertyDescription
element_name
string
Required.
element_index
integer
Optional.
element_matches
integer
Optional.
current_state
string
Optional.
min_size
string
Optional.
current_size
string
Optional.
max_size
string
Optional.
y_depth_ratio
number
Optional.
max_y_depth_ratio
number
Optional.
max_y_depth
string
Optional.
element_age_ms
integer
Optional.
times_in_view
integer
Optional.
total_time_visible_ms
integer
Optional.