Flow Rules
Flow rules decide which destination a visitor receives when they open a campaign domain.
Think of flows as lanes in a road. A rule is the sign above each lane: country == "FR" sends visitors from France into one lane, while is_mobile == true can send mobile visitors into another. The tracker checks the enabled flows in order and uses the first flow whose rule matches the visitor.
Use flow rules when different visitors should receive different landing pages or redirects inside the same campaign.
How Flow Selection Works
When a visitor opens a campaign domain, tracker follows this sequence:
Important behavior:
- Disabled and deleted flows are skipped.
- Flows are checked by their order in the campaign.
- A blank rule means the flow can match all traffic.
- The first matching flow wins.
- The default flow is used only when no normal flow matches.
- The default flow can still be used even if its own rule would not match.
Available Rule Fields
Use the following fields in flow rules.
| Field | Type | Example value | Use for |
|---|---|---|---|
country |
Text or null |
"FR" |
Country routing by two-letter country code |
browser_family |
Text or null |
"Chrome" |
Browser-based routing |
device_family |
Text or null |
"iPhone" |
Device model or device family routing |
os_family |
Text or null |
"iOS" |
Operating-system routing |
is_mobile |
Boolean | true |
Mobile or non-mobile traffic |
is_bot |
Boolean | false |
Bot or non-bot traffic |
roll |
Number | 1 to 100 |
Percentage-style traffic split |
Text values must be wrapped in double quotes.
country == "FR"
Boolean values use lowercase true or false.
is_mobile == true
null means the tracker could not recognize that specific field for the visitor, or the field does not exist in the visitor data. It does not mean you should type an empty string in the rule. For a normal catch-all flow, leave the whole rule field blank instead.
Common Operators
| Operator | Meaning | Example |
|---|---|---|
== |
Equals | country == "FR" |
!= |
Does not equal | country != "FR" |
and |
Both conditions must match | country == "FR" and is_mobile == true |
or |
At least one condition must match | country == "FR" or country == "BE" |
not |
Reverse a condition | not is_bot |
< |
Less than | roll < 50 |
<= |
Less than or equal | roll <= 50 |
> |
Greater than | roll > 50 |
>= |
Greater than or equal | roll >= 51 |
( ) |
Group conditions | (country == "FR" or country == "BE") and is_mobile == true |
Use parentheses when a rule mixes and and or. This makes the rule easier to read and prevents surprises.
Country Rules
Use country when visitors from different countries should see different offers or landing pages.
Country values are two-letter country codes, such as FR, US, UA, PL, or DE.
| Goal | Rule |
|---|---|
| France only | country == "FR" |
| Everyone except France | country != "FR" |
| France or Belgium | country == "FR" or country == "BE" |
| France mobile traffic only | country == "FR" and is_mobile == true |
| Non-France desktop traffic | country != "FR" and is_mobile == false |
Country detection requires IP2Location to be configured. If country targeting is unavailable, the tracker will not allow country-based rules to be saved.
Device, Browser, and OS Rules
Use browser, device, and operating-system fields when the landing page works better for a specific visitor environment.
| Goal | Rule |
|---|---|
| iPhone visitors | device_family == "iPhone" |
| Android visitors | os_family == "Android" |
| Chrome visitors | browser_family == "Chrome" |
| Mobile Safari on iOS | browser_family == "Mobile Safari" and os_family == "iOS" |
| Non-mobile visitors | is_mobile == false |
| Skip bots | is_bot == false |
The exact browser, device, and operating-system values come from the visitor's user agent. If you are unsure which value the tracker detects, check the reporting data for real traffic first, then use the same spelling in the rule.
Common detected values:
| Visitor environment | browser_family |
os_family |
device_family |
|---|---|---|---|
| Chrome on Windows | "Chrome" |
"Windows" |
"Other" |
| Microsoft Edge on Windows | "Edge" |
"Windows" |
"Other" |
| Firefox on Windows | "Firefox" |
"Windows" |
"Other" |
| Safari on macOS | "Safari" |
"Mac OS X" |
"Mac" |
| Chrome on macOS | "Chrome" |
"Mac OS X" |
"Mac" |
| Safari on iPhone | "Mobile Safari" |
"iOS" |
"iPhone" |
| Chrome on iPhone | "Chrome Mobile iOS" |
"iOS" |
"iPhone" |
| Safari on iPad | "Mobile Safari" |
"iOS" |
"iPad" |
| Chrome on Android | "Chrome Mobile" |
"Android" |
Device model, for example "Pixel 8 Pro" |
| Samsung Internet on Android | "Samsung Internet" |
"Android" |
Device model, for example "Samsung SM-S928B" |
| Firefox on Android | "Firefox Mobile" |
"Android" |
Often "Generic Smartphone" |
| Chrome on Linux desktop | "Chrome" |
"Linux" |
"Other" |
Use this table as a starting point, not as a complete catalog. Desktop devices often appear as "Other" or "Mac", while Android devices can appear as a specific model, a Samsung model code, or a generic device family.
Percentage Splits With roll
Use roll when you want to split traffic between flows.
For each visit, the tracker assigns a random number from 1 to 100. You can use that number to create percentage-style routing.
Example 50/50 split:
| Flow | Rule |
|---|---|
| Landing A | roll <= 50 |
| Landing B | roll >= 51 |
Example 70/30 split:
| Flow | Rule |
|---|---|
| Landing A | roll <= 70 |
| Landing B | roll > 70 |
You can also combine roll with targeting:
country == "FR" and roll <= 50
This rule matches about half of France traffic.
Blank Rules and Catch-All Flows
A blank rule means the flow can receive any visitor.
Use a blank rule carefully. Because the tracker selects the first matching flow, a blank-rule flow placed above more specific flows can catch traffic before those specific flows are checked.
Recommended order:
- Specific flows first.
- Broad flows after specific flows.
- Catch-all flow last.
- Default flow selected on the campaign.
Example:
| Order | Flow | Rule |
|---|---|---|
| 1 | France mobile | country == "FR" and is_mobile == true |
| 2 | France desktop | country == "FR" and is_mobile == false |
| 3 | Global mobile | is_mobile == true |
| 4 | Global fallback | blank |
Show Only Once Per Visitor
Show only once per visitor changes how repeat visits are handled.
When this option is enabled, the tracker can skip the flow after the same visitor has already seen it. This is useful when you want repeat visitors to move through several landing pages instead of seeing the same one every time.
Example rotation:
| Order | Flow | Rule | Show only once per visitor |
|---|---|---|---|
| 1 | Landing A | country == "FR" |
Enabled |
| 2 | Landing B | country == "FR" |
Enabled |
| 3 | France fallback | country == "FR" |
Disabled |
For a first visit from France, the visitor can receive Landing A. On a later visit, the tracker can skip Landing A and try Landing B. If both one-time flows were already shown, the France fallback remains available.
Practical Examples
Send France Traffic to a Local Landing
| Flow | Rule |
|---|---|
| France landing | country == "FR" |
| Global landing | country != "FR" |
Set the global landing as the campaign default flow.
Send Mobile and Desktop Traffic to Different Pages
| Flow | Rule |
|---|---|
| Mobile page | is_mobile == true |
| Desktop page | is_mobile == false |
This is useful when you have separate mobile and desktop landing pages.
Exclude Bot Traffic From Main Landings
| Flow | Rule |
|---|---|
| Main landing | is_bot == false |
| Bot fallback | is_bot == true |
You can also set a default flow for unmatched traffic.
Split One Country Between Two Offers
| Flow | Rule |
|---|---|
| France offer A | country == "FR" and roll <= 50 |
| France offer B | country == "FR" and roll > 50 |
| Global offer | country != "FR" |
This keeps the split inside France traffic only.
Checklist Before Saving Rules
Before saving or reordering flows, check the following:
- Text values are wrapped in double quotes.
- Boolean values are lowercase:
trueorfalse. - Country codes use two uppercase letters.
- Specific rules are above broad rules.
- Blank-rule catch-all flows are near the end.
- A campaign default flow is selected.
- The default flow is enabled and not deleted.
- Rules using
countryare used only when IP2Location is configured.
Troubleshooting
| Problem | Likely cause | Resolution |
|---|---|---|
| Rule cannot be saved | Syntax error or unsupported field name | Check field names, quotes, and operators |
| Country rule cannot be saved | IP2Location is not configured | Configure IP2Location before using country |
| Specific flow never receives traffic | A broader flow is ordered above it | Move the specific flow higher |
| Visitor receives the wrong flow | Multiple rules match and another flow wins first | Review flow order and make rules more precise |
| Visitor receives no destination | No enabled flow matches and no default flow is set | Add a catch-all flow or set a default flow |
| Repeat visitor skips a flow | Show only once per visitor is enabled |
Disable the option if the visitor should always stay on that flow |
| Browser or device rule does not match | Detected user-agent value differs from the rule text | Check real reporting values and update the rule spelling |