Smart routing
Send each scan of a dynamic code to a different URL based on time, device, language, country or an A/B split.
Smart routing lets one printed code serve different destinations. A restaurant can show a breakfast menu in the morning and a dinner menu at night. An app can send iPhone users to the App Store and Android users to Google Play. A campaign can split traffic between two landing pages to see which one performs better.
Routing works on dynamic codes only. It's available on Pro and Max.
Routing tools
| Tool | What it does | Where to set it up |
|---|---|---|
| Smart Rules | Routes by time of day, day of week, date range, device, language or scan count | Create and Edit |
| Geo-Targeting | Routes by the scanner's country | Edit |
| A/B Testing | Splits scans across weighted URLs | Create and Edit |
How a destination is chosen
On every scan, EZQR checks these in order and uses the first match:
- Smart Rules: the first enabled rule whose conditions all match.
- Geo-Targeting: a rule for the scanner's country, or the geo default URL if you set one.
- A/B Testing: a variant picked by weight.
- Target URL: the code's normal destination.
Smart rules
A rule has a name, a priority, one or more conditions and a destination.
Open the code and click Edit. (You can also set rules while creating a dynamic code.)
Turn on Smart Rules and click Add Rule.
Name the rule (for example "Morning Menu") and set its Priority. Rules are evaluated from priority 1 to 100, lowest first.
Under Conditions (all must match), click Add Condition and pick a type. Add up to 10 conditions per rule.
Under Redirect To, choose Single URL and enter a destination, or choose A/B Test to split this rule's traffic across variants.
Click Save.
Condition types
| Condition | Matches when |
|---|---|
| Time of Day | The scan falls between a start and end time. Ranges can cross midnight, for example 22:00 to 06:00. |
| Day of Week | The scan happens on one of the selected days. |
| Date Range | The scan date is on or after a start date and on or before an end date. Either date can be left empty. |
| Device Type | The scanner uses iOS, Android or Desktop. Anything that isn't iOS or Android counts as Desktop. |
| Language | One of the selected languages appears in the scanner's browser language settings. |
| Scan Count | The code's total scans equal, exceed, are below, are at least or are at most a number. |
If no rule matches, the scan falls through to geo-targeting, A/B testing and then the Target URL. The editor warns you when two rules overlap. The higher-priority rule wins.
Geo-targeting
Geo-targeting routes scans by the country EZQR detects for the scanner.
Open the code, click Edit and turn on Geo-Targeting.
Click Add Country Rule, pick a country and enter its URL. Repeat for each country.
Optionally set Default URL (fallback) for scans from every other country. If you leave it empty, those scans continue to A/B testing or the Target URL.
When a geo default URL is set, every scan that reaches geo-targeting gets a geo destination. The code-level A/B test is never used in that case.
A/B testing
A/B testing splits scans across two or more URLs by weight.
In Edit, turn on A/B Testing.
Add at least two variants with Add Variant. Give each one a name, a URL and a weight. Weights should add up to 100.
Click Save.
Each visitor is assigned a variant and keeps seeing the same one on later scans. While A/B testing is on, the Target URL field is disabled.
Plan limits
| Free | Lite | Pro | Max | |
|---|---|---|---|---|
| Smart rules per code | No | No | 5 | Unlimited |
| Geo-targeting rules per code | No | No | 5 | Unlimited |
| A/B variants | No | No | 2 | Unlimited |
Some limits apply on every plan: up to 20 smart rules per code, 10 conditions per rule, 50 country rules and 10 A/B variants. A/B tests inside a smart rule use the same variant limit as code-level tests.