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:
| Tracker | Supported | Since version | Auto-tracking | Notes |
|---|---|---|---|---|
| Web | ✅ | 3.18.0 | ✅ | Requires button click plugin |
| iOS | ❌ | |||
| Android | ❌ | |||
| React Native | ❌ | |||
| Flutter | ❌ | |||
| Roku | ❌ | |||
| Google Tag Manager | ✅ | v4 | ✅ | Integrates with button click plugin |
We recommend using the Base web data product template for web tracking. It includes button clicks.
button_click
EventExample
{
"label": "Submit",
"id": "submit-btn",
"classes": [
"btn",
"btn-primary"
],
"name": "submit"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
labelstring | Required. The text on the button, or a user-provided override |
idstring | Optional. The ID of the button |
classesarray | Optional. The classes of the button |
namestring | Optional. The name attribute of the button |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a button click event",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "button_click",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "The text on the button, or a user-provided override"
},
"id": {
"type": "string",
"description": "The ID of the button"
},
"classes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The classes of the button"
},
"name": {
"type": "string",
"description": "The name attribute of the button"
}
},
"required": [
"label"
],
"additionalProperties": false
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
select
unstruct_event_com_snowplowanalytics_snowplow_button_click_1 button_click_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'button_click'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_button_click_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'button_click'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_button_click_1 is not null
select
"button_click_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_button_click_1 "button_click_1"
on "button_click_1".root_id = events.event_id and "button_click_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "button_click_1".root_tstamp > getdate() - 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:
| Tracker | Supported | Since version | Auto-tracking | Notes |
|---|---|---|---|---|
| Web | ✅ | 2.1.0 (directly), 3.0.0 (as plugin) | ✅ | Requires form tracking plugin |
| iOS | ❌ | |||
| Android | ❌ | |||
| React Native | ❌ | |||
| Flutter | ❌ | |||
| Roku | ❌ | |||
| Python | ❌ | The Python tracker has deprecated form tracking APIs; use custom events with form schemas instead | ||
| Google Tag Manager | ✅ | v3 | ✅ | Integrates with form tracking plugin |
Focus form event
Triggered when a user focuses on a form field.
focus_form
EventExample
{
"formId": "contact-form",
"elementId": "email",
"nodeName": "INPUT",
"elementType": "email",
"elementClasses": [
"form-control"
],
"value": ""
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
formIdstring | Required. The ID of the form |
elementIdstring | Optional. The ID of the element |
nodeNamestring | Required. The node name of the element Must be one of: INPUT, TEXTAREA, SELECT |
elementTypestring | Optional. The type of the element |
elementClassesarray | Required. The classes of the element |
valuestring | Optional. The value of the element |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a form field focus event",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "focus_form",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"formId": {
"type": "string",
"description": "The ID of the form"
},
"elementId": {
"type": "string",
"description": "The ID of the element"
},
"nodeName": {
"type": "string",
"enum": [
"INPUT",
"TEXTAREA",
"SELECT"
],
"description": "The node name of the element"
},
"elementType": {
"type": [
"string",
"null"
],
"description": "The type of the element"
},
"elementClasses": {
"type": "array",
"items": {
"type": "string"
},
"description": "The classes of the element"
},
"value": {
"type": [
"string",
"null"
],
"description": "The value of the element"
}
},
"required": [
"formId",
"nodeName",
"elementClasses"
],
"additionalProperties": false
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
select
unstruct_event_com_snowplowanalytics_snowplow_focus_form_1 focus_form_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'focus_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_focus_form_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'focus_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_focus_form_1 is not null
select
"focus_form_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_focus_form_1 "focus_form_1"
on "focus_form_1".root_id = events.event_id and "focus_form_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "focus_form_1".root_tstamp > getdate() - 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
EventExample
{
"formId": "contact-form",
"elementId": "email",
"nodeName": "INPUT",
"elementType": "email",
"elementClasses": [
"form-control"
],
"value": "user@example.com"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
formIdstring | Required. The ID of the form |
elementIdstring | Optional. The ID of the element |
nodeNamestring | Required. The node name of the element Must be one of: INPUT, TEXTAREA, SELECT |
elementTypestring | Optional. The type of the element |
elementClassesarray | Required. The classes of the element |
valuestring | Required. The value of the element |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a form field change event",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "change_form",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"formId": {
"type": "string",
"description": "The ID of the form"
},
"elementId": {
"type": "string",
"description": "The ID of the element"
},
"nodeName": {
"type": "string",
"enum": [
"INPUT",
"TEXTAREA",
"SELECT"
],
"description": "The node name of the element"
},
"elementType": {
"type": [
"string",
"null"
],
"description": "The type of the element"
},
"elementClasses": {
"type": "array",
"items": {
"type": "string"
},
"description": "The classes of the element"
},
"value": {
"type": [
"string",
"null"
],
"description": "The value of the element"
}
},
"required": [
"formId",
"nodeName",
"elementClasses",
"value"
],
"additionalProperties": false
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
select
unstruct_event_com_snowplowanalytics_snowplow_change_form_1 change_form_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'change_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_change_form_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'change_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_change_form_1 is not null
select
"change_form_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_change_form_1 "change_form_1"
on "change_form_1".root_id = events.event_id and "change_form_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "change_form_1".root_tstamp > getdate() - 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
EventExample
{
"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
- Table
- JSON schema
| Property | Description |
|---|---|
formIdstring | Required. The ID of the form |
formClassesarray | Required. The classes of the form |
elementsarray | Required. The form elements and their values |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a form submission event",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "submit_form",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"formId": {
"type": "string",
"description": "The ID of the form"
},
"formClasses": {
"type": "array",
"items": {
"type": "string"
},
"description": "The classes of the form"
},
"elements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": [
"string",
"null"
]
},
"nodeName": {
"type": "string",
"enum": [
"INPUT",
"TEXTAREA",
"SELECT"
]
},
"type": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"nodeName"
],
"additionalProperties": false
},
"description": "The form elements and their values"
}
},
"required": [
"formId",
"formClasses",
"elements"
],
"additionalProperties": false
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
select
unstruct_event_com_snowplowanalytics_snowplow_submit_form_1 submit_form_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'submit_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_submit_form_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'submit_form'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_submit_form_1 is not null
select
"submit_form_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_submit_form_1 "submit_form_1"
on "submit_form_1".root_id = events.event_id and "submit_form_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "submit_form_1".root_tstamp > getdate() - 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:
| Tracker | Supported | Since version | Auto-tracking |
|---|---|---|---|
| Web | ✅ | 4.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 pageexpose_element: when a matching element scrolls into viewobscure_element: when a matching element scrolls out of viewdestroy_element: when a matching element is removed from the page
Create element:
create_element
EventExample
{
"element_name": "newsletter signup"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
element_namestring | Required. The name of the element that was created. Should match the element name field in entities that describe this particular element. |
{
"description": "Event that fires when an element matching a named configuration is detected as existing in or being added to a document.",
"properties": {
"element_name": {
"description": "The name of the element that was created. Should match the element name field in entities that describe this particular element.",
"type": "string",
"maxLength": 255
}
},
"additionalProperties": false,
"type": "object",
"required": [
"element_name"
],
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "create_element",
"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_snowplow_create_element_1 create_element_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'create_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_create_element_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'create_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_create_element_1 is not null
select
"create_element_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_create_element_1 "create_element_1"
on "create_element_1".root_id = events.event_id and "create_element_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "create_element_1".root_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'create_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
Expose element:
expose_element
EventExample
{
"element_name": "newsletter signup"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
element_namestring | Required. The name of the element that was exposed. Should match the element name field in entities that describe this particular element. |
{
"description": "Event that fires when an element matching a named configuration is detected as intersecting with the viewport, becoming visible to the user.",
"properties": {
"element_name": {
"description": "The name of the element that was exposed. Should match the element name field in entities that describe this particular element.",
"type": "string",
"maxLength": 255
}
},
"additionalProperties": false,
"type": "object",
"required": [
"element_name"
],
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "expose_element",
"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_snowplow_expose_element_1 expose_element_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'expose_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_expose_element_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'expose_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_expose_element_1 is not null
select
"expose_element_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_expose_element_1 "expose_element_1"
on "expose_element_1".root_id = events.event_id and "expose_element_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "expose_element_1".root_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'expose_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
Obscure element:
obscure_element
EventExample
{
"element_name": "newsletter signup"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
element_namestring | Required. The name of the element that was obscured. Should match the element name field in entities that describe this particular element. |
{
"description": "Event that fires when an element matching a named configuration is detected as becoming hidden from a user or moving out of the viewport.",
"properties": {
"element_name": {
"description": "The name of the element that was obscured. Should match the element name field in entities that describe this particular element.",
"type": "string",
"maxLength": 255
}
},
"additionalProperties": false,
"type": "object",
"required": [
"element_name"
],
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "obscure_element",
"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_snowplow_obscure_element_1 obscure_element_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'obscure_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_obscure_element_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'obscure_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_obscure_element_1 is not null
select
"obscure_element_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_obscure_element_1 "obscure_element_1"
on "obscure_element_1".root_id = events.event_id and "obscure_element_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "obscure_element_1".root_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'obscure_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
Destroy element:
destroy_element
EventExample
{
"element_name": "newsletter signup"
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
element_namestring | Required. The name of the element that was destroyed. Should match the element name field in entities that describe this particular element. |
{
"description": "Event that fires when an element matching a named configuration is detected as being removed from a document.",
"properties": {
"element_name": {
"description": "The name of the element that was destroyed. Should match the element name field in entities that describe this particular element.",
"type": "string",
"maxLength": 255
}
},
"additionalProperties": false,
"type": "object",
"required": [
"element_name"
],
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "destroy_element",
"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_snowplow_destroy_element_1 destroy_element_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'destroy_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
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'
select
unstruct_event_com_snowplowanalytics_snowplow_destroy_element_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'destroy_element'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_destroy_element_1 is not null
select
"destroy_element_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_destroy_element_1 "destroy_element_1"
on "destroy_element_1".root_id = events.event_id and "destroy_element_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "destroy_element_1".root_tstamp > getdate() - 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
EntityExample
{
"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
- Table
- JSON schema
| Property | Description |
|---|---|
element_namestring | Required. The name of the element |
widthnumber | Optional. The width of the element |
heightnumber | Optional. The height of the element |
position_xnumber | Optional. The x position of the element in the viewport |
position_ynumber | Optional. The y position of the element in the viewport |
doc_position_xnumber | Optional. The x position of the element in the document |
doc_position_ynumber | Optional. The y position of the element in the document |
element_indexinteger | Optional. The index of this element among all matching elements |
element_matchesinteger | Optional. The total number of elements matching the rule |
originating_page_viewstring | Optional. The page view ID when the element was first observed |
attributesarray | Optional. Custom attributes extracted from the element |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for element context",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "element",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"element_name": {
"type": "string",
"description": "The name of the element"
},
"width": {
"type": "number",
"description": "The width of the element"
},
"height": {
"type": "number",
"description": "The height of the element"
},
"position_x": {
"type": "number",
"description": "The x position of the element in the viewport"
},
"position_y": {
"type": "number",
"description": "The y position of the element in the viewport"
},
"doc_position_x": {
"type": "number",
"description": "The x position of the element in the document"
},
"doc_position_y": {
"type": "number",
"description": "The y position of the element in the document"
},
"element_index": {
"type": "integer",
"description": "The index of this element among all matching elements"
},
"element_matches": {
"type": "integer",
"description": "The total number of elements matching the rule"
},
"originating_page_view": {
"type": "string",
"description": "The page view ID when the element was first observed"
},
"attributes": {
"type": "array",
"description": "Custom attributes extracted from the element"
}
},
"required": [
"element_name"
],
"additionalProperties": false
}
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
EntityExample
{
"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
- Table
- JSON schema
| Property | Description |
|---|---|
element_namestring | Required. |
element_indexinteger | Optional. |
element_matchesinteger | Optional. |
current_statestring | Optional. |
min_sizestring | Optional. |
current_sizestring | Optional. |
max_sizestring | Optional. |
y_depth_rationumber | Optional. |
max_y_depth_rationumber | Optional. |
max_y_depthstring | Optional. |
element_age_msinteger | Optional. |
times_in_viewinteger | Optional. |
total_time_visible_msinteger | Optional. |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for element statistics",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "element_statistics",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"element_name": {
"type": "string"
},
"element_index": {
"type": "integer"
},
"element_matches": {
"type": "integer"
},
"current_state": {
"type": "string"
},
"min_size": {
"type": "string"
},
"current_size": {
"type": "string"
},
"max_size": {
"type": "string"
},
"y_depth_ratio": {
"type": "number"
},
"max_y_depth_ratio": {
"type": "number"
},
"max_y_depth": {
"type": "string"
},
"element_age_ms": {
"type": "integer"
},
"times_in_view": {
"type": "integer"
},
"total_time_visible_ms": {
"type": "integer"
}
},
"required": [
"element_name"
],
"additionalProperties": false
}