Dok.
Bla i dokumentasjonen

Traffic channels and sources

How Privatus Analytics classifies every visit into a traffic channel from UTM parameters and the referrer, including AI assistants and custom channel rules.

Vis som Markdown

Every visit gets one channel, from the landing page's campaign parameters and the referrer of its first hit. Rules are checked in this order, and the first match wins.

The Sources report with visitors by channel, with AI assistants listed next to search and social.
The Sources report with visitors by channel, with AI assistants listed next to search and social.
Channel Rule
paid_search A paid click id (gclid, msclkid…) or paid utm_medium from a search engine
paid_social A paid click id or paid utm_medium from a social network
paid_other Any other paid traffic. Paid mediums: cpc, ppc, paid, paidsearch, paid_search, cpm, cpv, display, banner, affiliate, paid_social, paidsocial
email utm_medium containing email, or newsletter. Webmail: mail.google.com, outlook.live.com, outlook.office.com, mail.yahoo.com, mail.proton.me, app.fastmail.com, mail.aol.com
ai_assistants Any .ai referrer, chatgpt.com, chat.openai.com, perplexity.ai, claude.ai, gemini.google.com, bard.google.com, copilot.microsoft.com, you.com, phind.com, meta.ai, grok.com, chat.mistral.ai, chat.deepseek.com, poe.com. Also utm_source chatgpt, chatgpt.com, openai, perplexity, claude, gemini, copilot, grok, deepseek, mistral
organic_search google, bing, duckduckgo, yahoo, yandex, baidu, ecosia, qwant, startpage, brave, naver, seznam, ask, aol, search.yahoo, kagi, mojeek, sogou, so.com. Also utm_medium organic, search
organic_social facebook.com, instagram.com, t.co, twitter.com, x.com, linkedin.com, lnkd.in, reddit.com, youtube.com, tiktok.com, pinterest.com, snapchat.com, threads.net, bsky.app, mastodon.social, news.ycombinator.com, whatsapp.com, telegram.org, discord.com, quora.com, tumblr.com, vk.com, weibo.com, producthunt.com. Also utm_medium social, social_media, sm, social-network
internal A referrer on one of the site’s own domains
referral Any other referrer or utm_source
direct No referrer and no campaign parameters

How the rules match:

  • Paid means a click id on the landing page URL, or a paid utm_medium. A paid visit is paid_search when it comes from a search engine, or its medium is cpc or contains search. Otherwise it is paid_social when it comes from a social network or its medium contains social. Every other paid visit is paid_other.
  • Search engines match the referrer's hostname (google matches google.com, google.de and so on) or a utm_source equal to the engine's name.
  • Social networks, webmail and AI assistants match the referrer's domain and its subdomains. A utm_source equal to the first part of a social domain (facebook, linkedin, reddit) also counts as social.
  • utm_source and utm_medium are compared in lowercase.

Click ids (gclid, gbraid, wbraid, msclkid, fbclid, ttclid, li_fat_id, twclid, dclid) mark a visit as a paid click. They're kept only as a yes/no flag. The id itself is discarded. Some networks add their click id to unpaid links too (Facebook adds fbclid to most links), and those visits count as paid as well.

Referrers, sources and campaigns#

  • Referrer is the hostname the visitor came from, with a leading www., m., l., lm., mobile. or amp. removed. Its path is stored too (for the referrer_url dimension). The referrer's query string is never stored. Referrers from the site's own domains and their subdomains are internal: the visit's referrer is left blank, and its channel is internal unless an earlier rule matched.
  • UTM parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term) come from the landing page URL.
  • ref is taken from the ref, via or source query parameter of the landing page URL (the first of the three that has a value).

A visit keeps the source it started with (first touch): later pages of the same visit don't change it.

Custom channel rules#

Site settings → Channels lets you add your own rules. They are checked from top to bottom before the built-in ones, and the first match wins. Use the arrows to move a rule up or down.

Each rule has a channel name (up to 32 characters, your own or a built-in one) and conditions that must all match. The form takes up to three conditions, and the API up to five. A site can have up to 25 rules.

Field What it is compared with
referrer_host The referrer's hostname, as described above
utm_source, utm_medium, utm_campaign The landing page's UTM parameters
ref The landing page's ref, via or source parameter
path The landing page's path
Operator Matches when the field
is equals the value
contains contains the value
starts_with starts with the value
regex matches the regular expression (up to 200 characters, without backreferences)

All four ignore case.

Example: channel Partners when ref starts_with partner-. Rules apply to new visits. Visits already stored keep their channel.

Preview takes a sample visit (referrer, landing page, utm_source, utm_medium, utm_campaign, ref) and shows the channel it would get, and whether a custom rule or the built-in list decided it.

Over the API and MCP: channel_rules_list, channel_rules_create, channel_rules_update, channel_rules_delete, channel_rules_move and channel_rules_preview.