Filter Rules
Available fields
Section titled “Available fields”Each filter rule matches against a field from your analytics data:
| Field | Description | Example values |
|---|---|---|
country | ISO 2-letter country code | US, GB, DE |
region | State or region | California, London |
city | City name | San Francisco, Berlin |
os | Operating system | iOS, Android, Windows |
device_type | Device form factor | mobile, desktop, tablet |
platform | Mobile platform | ios, android |
browser | Browser name | Chrome, Safari, Firefox |
event_type | Type of interaction | click, install, landing_view |
campaign | UTM campaign parameter | summer-promo |
source | UTM source parameter | instagram, email |
medium | UTM medium parameter | social, cpc |
term | UTM term parameter | deep+linking |
content | UTM content parameter | hero-banner |
prefix | Route prefix | /promo, /invite |
hostname | Domain or hostname | your-app.tolinku.com |
total_revenue | Lifetime purchase revenue (in base currency cents) | 5000 (= $50.00) |
order_count | Total number of completed purchases | 3, 10 |
last_purchase_days | Days since the user’s last purchase | 30, 90 |
avg_order_value | Average order value (in base currency cents) | 2500 (= $25.00) |
cart_abandoned | Whether the user has abandoned a cart | true |
purchased_item | Item ID the user has purchased | sku_1, sku_premium |
purchased_category | Item category the user has purchased from | Apparel, Electronics |
coupon_used | Coupon code the user has redeemed | SAVE10, WELCOME |
Operators
Section titled “Operators”| Operator | Meaning | Example |
|---|---|---|
eq | Equals (exact match) | country eq US |
neq | Not equal | platform neq android |
contains | Substring match (case-insensitive) | campaign contains summer |
not_contains | Substring not present | source not_contains bot |
in | Matches any value in a comma-separated list | country in US,CA,MX |
Combining rules
Section titled “Combining rules”All filter rules in a segment are combined with AND logic. Every rule must match for a user to be included in the segment.
For example, a segment with these rules:
country eq USplatform eq iossource eq instagram
Matches only users from the US, on iOS, who arrived via Instagram. All three conditions must be true.
Examples
Section titled “Examples”iOS users in North America:
platform eq ioscountry in US,CA,MX
Users from a specific campaign:
campaign eq summer-promo
Mobile users who are not from bots:
device_type eq mobilesource not_contains bot
High-value customers (spent over $100):
total_revenue gte 10000
Recent buyers (purchased in last 30 days):
last_purchase_days lte 30
Users who abandoned their cart:
cart_abandoned eq true
Users who bought from a specific category:
purchased_category eq Electronics