Traffic source classifier
Paste a referrer or a tagged link and see the channel and source a visit is filed under, with the rule that decided it. Runs in your browser.
How CrispStats files this visit
Direct
Direct
Rule 10: no referrer and no campaign tags, so the visit is direct.
The rules, in order
- 1Paid medium or ad click idPaid
- 2Email mediumEmail
- 3Affiliate mediumAffiliate
- 4Display mediumDisplay
- 5AI assistant referrer or sourceAI assistants
- 6Search referrer, or an organic mediumOrganic search
- 7Social referrer, source or mediumSocial
- 8Video referrer, source or mediumVideo
- 9Any other referrer or sourceReferral
- 10Nothing to go onDirect
The same classification code the collector runs, in your browser. Nothing you type is sent anywhere.
What does the classifier do?
It takes what a visit arrives with (the referrer, the landing URL and any UTM parameters) and runs the same classification code CrispStats runs on every new visit. The result is a traffic channel, a source name and the rule that decided it. It runs in your browser; nothing you paste is sent anywhere.
In what order are the rules checked?
The first rule that matches wins. Campaign tags you set on purpose come before what the referrer says.
| Order | Rule | Channel |
|---|---|---|
| 1 | utm_medium is cpc, ppc, paid, paid_social, cpm, cpv, cpa, retargeting or ads, or the URL has an ad click id such as gclid, msclkid or fbclid | Paid |
| 2 | utm_medium is email, e-mail, newsletter or mail | |
| 3 | utm_medium is affiliate, affiliates, partner or referral-program | Affiliate |
| 4 | utm_medium is display, banner or interstitial | Display |
| 5 | The referrer, or utm_source, is a known AI assistant (ChatGPT, Perplexity, Claude, Gemini, Copilot and others) | AI assistants |
| 6 | The referrer is a known search engine, or utm_source names one and utm_medium is organic | Organic search |
| 7 | The referrer or utm_source is a known social network (Facebook, FB and fb.com are one), or utm_medium is social | Social |
| 8 | The referrer or utm_source is a known video site, or utm_medium is video | Video |
| 9 | Any other referrer, or a utm_source with no medium that names a channel | Referral |
| 10 | No referrer and no campaign tags, or a referrer from your own site | Direct |
Why does a Google visit sometimes count as paid?
Because rule 1 comes before rule 6. A click on a Google ad arrives with google.com as its referrer, just like an organic result, but its landing URL carries a gclid. The click id is the stronger signal, so the visit is paid.
How is the source name chosen?
- If the referrer is on one of the known lists, the source is its name: chatgpt.com becomes ChatGPT, news.ycombinator.com becomes Hacker News.
- Otherwise a
utm_sourcethat names a known network is filed under that network’s one name: Facebook, FB, fb.com and facebook.com are all Facebook. Any other value is lowercased, so Newsletter and newsletter share a row. - Otherwise it is the referrer’s hostname without
www., or Direct when there is none.
Why is so much traffic direct?
Many apps send no referrer: email clients, chat apps, PDFs and some AI assistant apps. Those visits look the same as someone typing your address. Direct traffic is shrunk by tagging the links you control with the UTM builder. Our guide to tracking visitors from AI assistants covers the AI case in detail.
Terms used here
Guides
- What is direct traffic in Google Analytics, and how do you shrink it?Direct traffic in GA4 is sessions with no referrer, no UTM tags and no ad click ID. What ends up there, how GA4 credits it, and how to shrink it.
- Website traffic sources explained: channels, referrals and directWhat website traffic sources and channels are, what referral traffic is, how tools sort each visit from the referrer and UTM tags, and how to compare sources.
- What is UTM tracking, and what does UTM stand for?UTM stands for Urchin Tracking Module. What UTM tracking is, the five tags, how a tagged link becomes a row in your analytics, and what UTMs cannot do.
More free tools
All free tools- UTM builderTag one link or hundreds with UTM parameters, check them for mistakes, export a CSV and see which channel each counts as.
- UTM checkerPaste a link and see which UTM tags are missing, which have capitals, and which are fine.
- UTM naming checkerClean a list of campaign names or links: lowercase, spaces to underscores, and a note of each change.
- GA4 URL testerSee the GA4 channel group for a tagged link, and the CrispStats channel beside it.
- UTM link testerCheck a tagged link for missing tags and messy spelling, and see both channel names before you send it.
- URL cleanerRemove fbclid, gclid and other tracker parameters from a link, and keep the UTM tags.
- UTM stripperTake the UTM tags off a link and leave the page, the hash and every other parameter.
- URL parserSplit a link into its protocol, host, path, query parameters and hash.