How rules are applied
- The built-in classifier runs first and gives every visit its starting values.
- Every enabled rule whose conditions match then runs, highest Priority first.
- If two rules write the same field, the higher-priority rule wins.
- Any field your rules don’t touch keeps the built-in value.
Actions
The fields a rule can write are Channel, Channel group, UTM source, UTM medium, UTM campaign, UTM content, UTM term and Referrer domain.
Conditions
A condition compares one fact about the visit with a value. Facts include the UTM tags, Ad click ID and its type, Referrer URL, Referrer domain and Referrer path, Is direct, Landing page, Landing domain and Landing path, Device, Browser, Operating system and Browser language. Operators include is, is not, contains, does not contain, starts with, ends with, is the domain (or a subdomain), matches regex, is set and is not set. Under How conditions combine, choose whether a visit must match all of the conditions or any of the conditions. Visits from your own site’s domain count as internal navigation, and a referrer rule can’t claim them.Create a rule
1
Start a rule
Click New rule. Give it a Name, and optionally Tags to keep rules organized.
2
Add conditions
Under When, click Add condition and pick a field, an operator and a value. For example: Referrer domain is the domain (or a subdomain)
partners.example.com.3
Add actions
Under Actions, click Add action. For example: Channel set to
referral, UTM source set to partner-portal.4
Set the priority
A higher Priority runs first and wins conflicts.
5
Test it
Use Test this rule: describe a visit (empty boxes count as absent) and click Test. The result shows whether the rule matches and what it would write. The test uses the same logic as live tracking.
6
Save
Click Add rule. Use the up and down arrows to reorder rules, and the toggle to turn a rule on or off.
Starter rules
If your workspace has no generated rules yet, Add starter rules writes the built-in classification (search engines, social networks, mailbox providers, AI assistants, paid click ids and the standard UTM mediums) as ordinary, editable rules. Rules you already wrote are kept and moved above the starter rules, so they still win.AI assistant rules
Starter rules added before October 2026 cover fewer AI assistants and ignoreutm_source=chatgpt.com and the ai / llm / ai-assistant mediums. In those workspaces Add AI assistant rules appears next to New rule. It adds the missing assistant rules, updates the original assistant rules you never edited (including moving them above the search rules, because gemini.google.com is also a Google address), and leaves any assistant rule you changed exactly as it is. The button disappears once there is nothing left to add. Then use Re-run over past visits to reclassify earlier traffic.
Re-run over past visits
A rule only affects visits recorded after you save it. To apply your enabled rules to visits you’ve already collected:- Click Re-run over past visits.
- Choose How much history to re-run: last 30 days, last 90 days, last 12 months or all time.
- Click Re-run attribution.
See how your rules perform
Click See how rules perform at the top of the rules page to open the Conversion attribution report. It lists every rule with the visits it matched, the visits whose channel it decided, and the conversions and revenue those visits went on to earn, and it marks rules that never matched a visit in the period.Troubleshooting
My rule doesn't seem to apply
My rule doesn't seem to apply
Check that it’s enabled. Use Test this rule with the values of a real visit. Check whether a higher-priority rule writes the same field. Remember that rules only apply to new visits until you re-run.
A regex pattern is refused when saving
A regex pattern is refused when saving
matches regex is case-insensitive and matches anywhere in the value, so anchor it with
^ and $ if you need an exact match. Patterns longer than 200 characters, or with nested repetition such as (a+)+ that could slow tracking down, are refused.