Skip to main content
Every website visit gets a channel (direct, search, social, email, paid, AI or referral), a channel group and a source. Built-in rules already recognize the major search engines, social networks, mailbox providers and AI assistants. Add your own rule when you know something they can’t, such as a partner’s domain, an offline campaign tag or a medium your agency uses. Rules live at Analytics → Attribution Rules. Every role can read them, because they explain the charts. Only owners and administrators can change them.

How rules are applied

  1. The built-in classifier runs first and gives every visit its starting values.
  2. Every enabled rule whose conditions match then runs, highest Priority first.
  3. If two rules write the same field, the higher-priority rule wins.
  4. Any field your rules don’t touch keeps the built-in value.
This isn’t “first match wins”. A low-priority catch-all rule with no conditions matches every visit. With default to actions, it fills only the fields nothing else has set.

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.
After you add starter rules, the rules are the classification. The built-in platform lists stop running underneath them. Deleting the “Google” search rule, for example, really does stop visits from google.com being counted as search. You can add starter rules only once per workspace.

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:
  1. Click Re-run over past visits.
  2. Choose How much history to re-run: last 30 days, last 90 days, last 12 months or all time.
  3. Click Re-run attribution.
Progress shows as visits checked and re-classified. It’s safe to run more than once, because it only changes visits whose channel, group or source actually changes. After you delete a rule, run a re-run to re-classify the visits that rule had labeled.

Troubleshooting

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.
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.