Skip to content

Filter Rules

Each filter rule matches against a field from your analytics data:

FieldDescriptionExample values
countryISO 2-letter country codeUS, GB, DE
regionState or regionCalifornia, London
cityCity nameSan Francisco, Berlin
osOperating systemiOS, Android, Windows
device_typeDevice form factormobile, desktop, tablet
platformMobile platformios, android
browserBrowser nameChrome, Safari, Firefox
event_typeType of interactionclick, install, landing_view
campaignUTM campaign parametersummer-promo
sourceUTM source parameterinstagram, email
mediumUTM medium parametersocial, cpc
termUTM term parameterdeep+linking
contentUTM content parameterhero-banner
prefixRoute prefix/promo, /invite
hostnameDomain or hostnameyour-app.tolinku.com
total_revenueLifetime purchase revenue (in base currency cents)5000 (= $50.00)
order_countTotal number of completed purchases3, 10
last_purchase_daysDays since the user’s last purchase30, 90
avg_order_valueAverage order value (in base currency cents)2500 (= $25.00)
cart_abandonedWhether the user has abandoned a carttrue
purchased_itemItem ID the user has purchasedsku_1, sku_premium
purchased_categoryItem category the user has purchased fromApparel, Electronics
coupon_usedCoupon code the user has redeemedSAVE10, WELCOME
OperatorMeaningExample
eqEquals (exact match)country eq US
neqNot equalplatform neq android
containsSubstring match (case-insensitive)campaign contains summer
not_containsSubstring not presentsource not_contains bot
inMatches any value in a comma-separated listcountry in US,CA,MX

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 US
  • platform eq ios
  • source eq instagram

Matches only users from the US, on iOS, who arrived via Instagram. All three conditions must be true.

iOS users in North America:

  • platform eq ios
  • country in US,CA,MX

Users from a specific campaign:

  • campaign eq summer-promo

Mobile users who are not from bots:

  • device_type eq mobile
  • source 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