Sign in
← Attribution docs
Documentation

How MTK Attribution categorizes

No guesswork, no black box — these are the exact values the engine looks for when it assigns every visit a channel and source. If a lead is ever categorized in a way you don't expect, this page tells you precisely why.

How channel & source are classified

channel and source are computed, not read from a single parameter. Classification runs once per session, on that session's first page load, from that page's URL parameters and referrer. The engine walks the rules below in order and the first match wins — these are the exact values it looks for. All comparisons are case-insensitive.

Rule 1
Paid AI

utm_medium is exactly paid_ai (changeable per license via the paidAiMedium config) — or utm_source names an AI platform (alias table below) alongside any paid medium: cpc, ppc, paid, paid_search, or paid_social. ChatGPT Ads' own macro example is utm_source=chatgpt&utm_medium=cpc, so the AI source decides — that click is never Paid Search or Paid Social. Exception: a Google / Microsoft click ID (gclid, gbraid, wbraid, msclkid) still wins, whatever the UTMs say.

Source: The canonical AI platform name (ChatGPT, Perplexity, …) in normalized mode; else utm_source title-cased; else ChatGPT when paid_ai arrives with no source at all.

Rule 2
Paid Social

No gclid, gbraid, wbraid, or msclkid in the URL (a Google / Microsoft click ID always means Paid Search), and any one of:1. utm_mediumcontains both “paid” and “social”, in any spelling — paid_social, paidsocial, social-paid, Paid Social (plus the per-license paidSocialMedium value).2. utm_medium is paid, cpc, or ppc and there is a social signal: a social utm_source (list below), an fbclid or ttclid, or a social referrer. So utm_source=facebook&utm_medium=cpc is a social ad, not a search ad.3. utm_medium is a social medium — social, social-media, sm, or social-network — and a utm_campaign is present. The campaign is what separates an ad from a post; without one, see Organic Social (tagged) below. Tag organic posts without a utm_campaign to keep them organic.

Source: utm_source (per the source-format setting below); else TikTok for a ttclid, Facebook for an fbclid, the platform behind a social referrer; else Facebook.

Rule 3
Paid Search

A gclid, gbraid, wbraid, or msclkid URL parameter is present — or utm_medium is exactly cpc or paid_search.

Source: Microsoft Ads if msclkid (or a bing/bingads/microsoft utm_source); Google Ads when untagged or for google/googleads/adwords; any other utm_sourceper the source-format setting below. Paid-search sources always carry “Ads” in normalized mode so they can't be confused with organic.

Rule 4
Paid Social · TikTok

A ttclid URL parameter is present (and no rule above matched).

Source: Always TikTok.

Rule 5
Email

utm_medium is exactly email.

Source: utm_source (per the source-format setting below); else Email.

Rule 6
Organic AI (tagged)

utm_source names an AI platform (alias table below) with none of the paid signals above — ChatGPT appends utm_source=chatgpt.comto its outbound links, often with no referrer at all. Checked before the tagged catch-all rule so an assistant's citation never reads as a campaign nobody ran.

Source: The canonical AI platform name in normalized mode (chatgpt.com → ChatGPT); verbatim mode passes the typed value through.

Rule 7
Organic Social (tagged)

utm_medium is a social medium (social, social-media, sm, social-network) with no utm_campaign — an organic post someone tagged, not an ad.

Source: Same as Paid Social: utm_source; else the platform from the click ID or social referrer; else Facebook.

Rule 8
Referral / custom medium / Unassigned (tagged)

Any utm_source with none of the signals above. The channel is:Referral when utm_medium is exactly referral;the medium itself when utm_medium is anything else — banner → Banner, display_ads → Display Ads (title-cased in normalized mode, as typed in verbatim mode);Unassigned (GA4's name) when there is no utm_medium at all.Before engine v7.1 both of the last two cases were Campaign. If a CRM channel field is a restricted picklist, add Unassigned and any custom mediums you use, or those leads may be rejected or left blank.

Source: utm_source (per the source-format setting below).

Rule 9
Organic AI (referrer)

No UTMs; the referrer hostname matches an AI-assistant domain (list below). Checked before the search-engine list on purpose: gemini.google.com and copilot.microsoft.com sit under search-engine hosts, and would otherwise classify as Organic Search.

Source: From the referrer — see the source-name table below.

Rule 10
Organic Search

No UTMs; the referrer hostname matches a search-engine domain (list below). Exception: a Google referrer with a fresh _gcl_aw cookie upgrades to Paid Search / Google Ads — an ad click whose gclid was lost in transit and recovered out of the cookie (see the cookie-rescue row below).

Source: From the referrer — see the source-name table below.

Rule 11
Organic Social

No UTMs; the referrer hostname matches a social domain (list below) — or an fbclid URL parameter is present alongside any referrer. Exception: a Facebook/Instagram referrer with a fresh _fbc cookie and no fbclid in the URL upgrades to Paid Social / Facebook — the cookie is only evidence of a paid click when the URL parameter went missing. Meta puts fbclid on every outbound link, organic posts included, and the Pixel writes _fbc from whichever one it sees, so a _fbc sitting next to an fbclid is just that click echoed back. Untagged Meta ads are indistinguishable from organic Facebook here — a paid-social utm_medium on ad URLs (see the Paid Social rule above) is what separates them.

Source: From the referrer — see the source-name table below.

Rule 12
Referral

No UTMs; any other referrer. A referrer from the site's own hostname never counts — internal navigation (idle-timeout session renewals, consent-delayed tag loads) is ignored for classification entirely.

Source: The referrer's hostname with www. stripped, e.g. partnersite.com.

Rule 13
Organic Social · Facebook

An fbclid URL parameter with no referrer at all (some in-app browsers strip it).

Source: Always Facebook.

Rule 14
Paid Search / Paid Social · cookie rescue

No click IDs, no UTMs, no (external) referrer — but a fresh platform cookie exists: _gcl_aw (Google) or _fbc (Meta) created within the session window. The ad click just happened; its URL signal was lost (consent redirect, URL rewrite, tag firing mid-session). The click ID is recovered out of the cookie into the touch. A stale cookie never classifies — those cookies live ~90 days, and a returning visitor is Direct.

Source: Google Ads (from _gcl_aw) or Facebook (from _fbc).

Rule 15
Direct

Nothing identifying — no click IDs, no UTMs, no referrer, no fresh platform cookies.

Source: Always Direct.

Built-in AI-assistant domains

A referrer from any of these classifies as Organic AI. Checked before the search-engine list. Extendable per license via the aiDomains config — an entry typed verbatim as utm_source counts as an AI source too.

chatgpt.comopenai.comperplexity.aiclaude.aigemini.google.combard.google.comcopilot.microsoft.comgrok.commeta.aideepseek.comyou.commistral.ai

Built-in search-engine domains

A referrer from any of these classifies as Organic Search. Extendable per license via the searchDomains config.

google.bing.yahoo.duckduckgo.ecosia.

Built-in social domains

A referrer from any of these classifies as Organic Social. Extendable per license via the socialDomains config.

facebook.fb.instagram.linkedin.twitter.x.comyoutube.reddit.pinterest.tiktok.t.co

Built-in social utm_source values

A utm_source from this list is a social signal for the Paid Social rule — it turns paid, cpc, or ppc into Paid Social. Hostname spellings match too (facebook.com, m.facebook.com). Extendable per license via the socialSources config.

facebookfbmetainstagramigmessengermsganaudience_networktiktoklinkedintwitterxredditpinterestyoutubesnapchatthreadsquoranextdoor

Source names from referrers

When a rule derives source from the referrer, these hostname matches produce these names. Any referrer not listed reports its own hostname (minus www.) as the source — e.g. a visit from Ecosia is Organic Search / ecosia.org.

ChatGPT
chatgpt.comopenai.com
Perplexity
perplexity.ai
Claude
claude.ai
Gemini
gemini.google.combard.google.com
Copilot
copilot.microsoft.com
Grok
grok.com
Meta AI
meta.ai
DeepSeek
deepseek.com
You.com
you.com
Mistral
mistral.ai
Google
google.
Bing
bing.
Yahoo
yahoo.
DuckDuckGo
duckduckgo.
Facebook
facebook.fb.
Instagram
instagram.
LinkedIn
linkedin.
Twitter/X
twitter.x.comt.co
YouTube
youtube.
Reddit
reddit.
Pinterest
pinterest.
TikTok
tiktok.

How domains are matched

Matching runs against the referrer's hostname only — never its path or query string. Entries ending in a dot (google.) match that label anywhere in the host (google.com, news.google.de). Entries with an inner dot (x.com) match that exact domain or a subdomain of it — so x.com and www.x.com qualify, while wix.comdoes not. Custom entries with no dot at all match anywhere in the host. A referrer from the site's own hostname is ignored for classification entirely.

How utm_source becomes the source value

In normalized mode (the default), typed utm_source values are cleaned to canonical platform names — so paid, organic, and click-ID traffic from one platform share one spelling, and Meta's {{site_source_name}} values arrive readable. A utm_source typed as a hostname collapses to its platform first — facebook.com and m.facebook.com read Facebook, google.com with cpc reads Google Ads, t.co reads Twitter/X— while a hostname that isn't a known platform is reported lowercased without www. (partnersite.com). Other values not in the table are title-cased. In verbatim mode (per-license toggle) typed values pass through byte-for-byte — engine-derived fallbacks (untagged clicks, referrers, cookie rescues) stay curated in both modes.

Facebook
fb
Instagram
ig
Messenger
msg
Audience Network
an
YouTube
youtube
LinkedIn
linkedin
TikTok
tiktok
DuckDuckGo
duckduckgo
Twitter/X
twitterx
Google Ads (paid)
googlegoogleadsadwords
Microsoft Ads (paid)
bingbingadsmicrosoft

The (paid)rows apply within Paid Search classification — where sources always carry “Ads” so a source pivot can't mix paid and organic Google or Bing traffic.

AI platform utm_source values

These utm_source values mark a visit as AI traffic — Organic AI on its own, Paid AI with a paid medium — and normalize to the same name the referrer produces, so tagged and untagged arrivals from one assistant share one spelling. Unlike paid search, the paid and organic source share the name (ChatGPT both ways); the channel is what separates them.

ChatGPT
chatgptchatgpt.comopenaichat.openai.comopenai.com
Perplexity
perplexityperplexity.ai
Claude
claudeclaude.aianthropic
Gemini
geminigemini.google.combardbard.google.com
Copilot
copilotcopilot.microsoft.com
Grok
grokgrok.com
Meta AI
meta.aimetaai
DeepSeek
deepseekdeepseek.com
You.com
you.com
Mistral
mistralmistral.ai

See also: What MTK Attribution captures · Recommended UTM parameters · Data source reference