How contextual conditions work
Contextual conditions are evaluated at request time against session context data including:- Geographic data: Country, state/province, city
- Market data: Market ID, market handle, market countries
- Customer attributes: Customer tags, account status, purchase history
- UTM parameters: Marketing source, medium, campaign
- Device information: Device type, operating system
- Shopping channel: Online store, mobile app, etc.
Condition examples
The contextual conditions form in the dashboard lets you build these targeting rules without writing code. Below are common examples of what you can set up. Target US visitors:
Target mobile users in California (combine with AND):
Target visitors from specific marketing campaigns:
Target visitors from a specific Klaviyo campaign:
The Klaviyo: Campaign field is available once you connect Klaviyo under Settings → Integrations. Select a campaign from the dropdown and Layers matches shoppers whose session UTMs came from that campaign across email, SMS, and push. See Klaviyo for setup details.
Target customers with specific tags:
You can target shoppers based on Shopify customer tags (for example, “vip”, “wholesale”, or any tag synced from Shopify). Use “is in list” or “is not in list” to match against multiple tags, or “contains” to match any tag that includes a substring.
Target visitors in a specific Shopify Market (by handle):
Target visitors in markets that include a specific country:
Case sensitivity
String-based condition operators are case-insensitive. A condition matching “klaviyo” also matches “Klaviyo” or “KLAVIYO”. This coversequals, does not equal, in, not in, contains, does not contain, begins with, does not begin with, ends with, and does not end with whenever the value is a string. Numeric and boolean equality stays exact.
Case-insensitive matching applies wherever contextual conditions are evaluated, including merchandising rules, request transforms, sort orders, and block rules.