Site search tracking
Site search tracking captures how users search within your website. This data helps you understand what content users are looking for, whether they find it, and how search influences their journey through your site.
Use site search tracking to:
- Identify popular search terms and content gaps
- Measure search success rates based on result counts
- Analyze how search filters affect user behavior
- Optimize your internal search functionality
This table shows the support for site search tracking across the main client-side Snowplow tracker SDKs:
| Tracker | Supported | Since version | Auto-tracking | Notes |
|---|---|---|---|---|
| Web | ✅ | 3.0.0 | ❌ | Requires site tracking plugin |
| iOS | ❌ | |||
| Android | ❌ | |||
| React Native | ❌ | |||
| Flutter | ❌ | |||
| Roku | ❌ | |||
| Google Tag Manager | ✅ | v3 | ❌ |
The site search event captures the search terms, any filters applied, and the number of results returned.
site_search
EventSchema URIiglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0
Example
json
{
"terms": [
"unified",
"log"
],
"filters": {
"category": "books",
"sub-category": "non-fiction"
},
"totalResults": 14,
"pageResults": 8
}
Properties and schema
- Table
- JSON schema
| Property | Description |
|---|---|
termsarray | Required. The search terms |
filtersobject | Optional. The search filters |
totalResultsinteger | Optional. The total number of results |
pageResultsinteger | Optional. The number of results on the page |
json
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a site search event",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "site_search",
"format": "jsonschema",
"version": "1-0-0"
},
"type": "object",
"properties": {
"terms": {
"type": "array",
"items": {
"type": "string"
},
"description": "The search terms"
},
"filters": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"description": "The search filters"
},
"totalResults": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "The total number of results"
},
"pageResults": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "The number of results on the page"
}
},
"required": [
"terms"
],
"additionalProperties": false
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
sql
select
unstruct_event_com_snowplowanalytics_snowplow_site_search_1 site_search_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'site_search'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
sql
select
unstruct_event_com_snowplowanalytics_snowplow_site_search_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 = 'site_search'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
sql
select
unstruct_event_com_snowplowanalytics_snowplow_site_search_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'site_search'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_site_search_1 is not null
sql
select
"site_search_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_site_search_1 "site_search_1"
on "site_search_1".root_id = events.event_id and "site_search_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "site_search_1".root_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'site_search'
and events.event_vendor = 'com.snowplowanalytics.snowplow'