How routing rules work
Routing rules are evaluated before Jurni uses the visitor’s existing experiment assignment or the normal weighted traffic split. The current routing order is:- Jurni checks the experiment’s Routing Rules from top to bottom.
- The first matching rule wins.
- If a rule matches, the visitor is routed to that rule’s configured variant and that assignment is remembered.
- If no rule matches and the visitor already has a valid assignment for the experiment, Jurni keeps that assignment.
- If there is no matching rule and no valid existing assignment, Jurni chooses a variant using the configured traffic weights.
A matching routing rule can override a visitor’s previous experiment assignment. This is intentional: deterministic routing rules take priority over the normal split.
Supported conditions
The Routing Rules editor includes presets for:utm_sourceutm_mediumutm_campaignutm_contentutm_term
- equals
- does not equal
Example: route personas to different variants
Suppose one campaign sends:?utm_term=persona1
and another sends:
?utm_term=persona2
You can configure:
utm_termequalspersona1→ Variant Autm_termequalspersona2→ Variant B
Rule order matters
Jurni checks rules from top to bottom and stops on the first match. If more than one rule could match the same visitor, place the more specific rule above the broader rule. You can reorder rules in the Routing Rules editor.Query parameters are preserved
When Jurni redirects an experiment visitor to the selected destination, incoming campaign/query parameters are carried forward to the destination URL, except for internal Shopify proxy parameters and internal parameters that begin with_.
Jurni also appends experiment context to the destination URL:
jurni_ab_test_idjurni_ab_variant_id
Assignment persistence
Jurni remembers the selected variant for the experiment so repeat visits do not need to be randomly reassigned on every request. The current experiment assignment is stored for up to 30 days. If a Routing Rule matches on a later visit, that rule takes priority and the remembered assignment is updated to the routed variant.When to use Routing Rules
Routing Rules are useful for:- persona-specific landing pages
- creative-to-page congruence
- campaign-specific variants
- source or medium-specific experiences
- preserving deterministic routing while keeping a weighted fallback for everyone else
QA before launch
Test every rule with the exact parameter/value combination your campaign will send. Verify that:- The matching URL reaches the intended variant.
- A non-matching URL follows the expected fallback behavior.
- Campaign parameters are still present on the destination.
- The destination includes the correct Jurni experiment and variant IDs.
- Rule order does not create an unintended earlier match.
