Skip to content

Query Filters

Filter groups allow you to do queries by event’s metadata.

Filters consist of:

  • filter_groups - conditions joined with OR
  • filters - conditions joined with AND

Conditions:

  • field_name - metadata property
  • operator - condition operator
    • Equal =
    • Greater than or equal >=
    • Less than or equal <=
    • Less than <
    • Greater than >
    • Not equal <>
    • Is null IS NULL
    • Is not null IS NOT NULL
  • value - condition value

Example:

All events that have path equal to /mobile-app OR /blog

{
"filter_groups": [
{
"filters": [
{
"field_name": "path",
"operator": "=",
"value": "/mobile-app"
}
]
},
{
"filters": [
{
"field_name": "path",
"operator": "=",
"value": "/blog"
}
]
}
]
}

All events that have path equal to / AND referrer equal to google.com

{
"filter_groups": [
{
"filters": [
{
"field_name": "path",
"operator": "=",
"value": "/"
},
{
"field_name": "referrer",
"operator": "=",
"value": "google.com"
}
]
},
]
}