Skip to content

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.

Try an example

The page the visitor came from. Empty means no referrer.

The first page they saw. UTM tags and ad click ids are read from it.

Overrides the landing URL.

Overrides the landing URL.

Taken from the landing URL if empty. Visits from it count as direct.

How CrispStats files this visit

Direct

Direct

Rule 10: no referrer and no campaign tags, so the visit is direct.

The rules, in order

  1. 1Paid medium or ad click idPaid
  2. 2Email mediumEmail
  3. 3Affiliate mediumAffiliate
  4. 4Display mediumDisplay
  5. 5AI assistant referrer or sourceAI assistants
  6. 6Search referrer, or an organic mediumOrganic search
  7. 7Social referrer, source or mediumSocial
  8. 8Video referrer, source or mediumVideo
  9. 9Any other referrer or sourceReferral
  10. 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.

In what order are the rules checked?
OrderRuleChannel
1utm_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 fbclidPaid
2utm_medium is email, e-mail, newsletter or mailEmail
3utm_medium is affiliate, affiliates, partner or referral-programAffiliate
4utm_medium is display, banner or interstitialDisplay
5The referrer, or utm_source, is a known AI assistant (ChatGPT, Perplexity, Claude, Gemini, Copilot and others)AI assistants
6The referrer is a known search engine, or utm_source names one and utm_medium is organicOrganic search
7The referrer or utm_source is a known social network (Facebook, FB and fb.com are one), or utm_medium is socialSocial
8The referrer or utm_source is a known video site, or utm_medium is videoVideo
9Any other referrer, or a utm_source with no medium that names a channelReferral
10No referrer and no campaign tags, or a referrer from your own siteDirect

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?

  1. 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.
  2. Otherwise a utm_source that 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.
  3. 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.

More free tools

All free tools

Tool questions. Straight answers.

What people ask about this tool before they use the number.

  • Yes. The tool imports the same classification function the CrispStats collector uses, so what you see here is what the dashboard will show.

  • A medium that names a channel does: paid, email, affiliate and display win over any referrer. A utm_source that names a known social network, video site or AI assistant also sets the channel when no stronger medium is set, and the spelling is folded into one source. A search-engine source counts as organic search only when the medium is organic, or when the referrer is the search engine itself.

  • They are not part of this classification. Crawlers do not run JavaScript, so they never send a pageview. AI crawler hits are reported separately from server logs or middleware, by matching the User-Agent.

  • A referrer from your own hostname means the visitor moved between your pages, not that someone sent them. Counting it as a referral would credit your own site for its own traffic.

Not answered here? Write to hello@crispstats.com

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.