AI assistant traffic using UTM qualifiers is incorrectly attributed as campaign or search traffic
What happened?
Matomo currently identifies AI assistant traffic mainly from:
- the HTTP referrer URL;
- an
utm_sourcevalue that itself matches a known AI assistant domain, such asutm_source=chatgpt.com.
This is insufficient for AI platforms that:
- omit the HTTP referrer and use a non-domain
utm_sourcevalue; or - use the same referrer domain for ordinary search and AI-generated traffic, with landing-page parameters identifying the AI surface.
As a result, valid AI assistant visits may be classified as campaigns or ordinary search-engine visits.
Examples
Perplexity
Perplexity may refer a user with no HTTP referrer and the following landing parameter:
utm_source=perplexityExample request:
GET /page.html?utm_source=perplexity
Referer: emptyCurrent result:
referer_type = 6
referer_name = perplexityThe visit is classified as a campaign.
Expected result:
referer_type = 8
referer_name = PerplexityQwant Chat IA
Qwant uses the same qwant.com referrer for ordinary search and AI-generated traffic.
A click from the dedicated Qwant Chat IA surface contains:
utm_source=qwant
utm_medium=referral
utm_campaign=ai_chat
Referer: https://www.qwant.com/Expected result:
referer_type = 8
referer_name = Qwant Chat IAQwant AI Flash
A click from the AI-generated summary displayed in Qwant search results contains:
utm_source=qwant
utm_medium=referral
utm_campaign=ai_flash
Referer: https://www.qwant.com/Expected result:
referer_type = 8
referer_name = Qwant AI FlashOrdinary Qwant traffic without these AI qualifiers must remain classified as:
referer_type = search engine
referer_name = QwantRoot cause
The current AIAssistants.yml format is a flat list of assistant domains.
This format can express:
Perplexity:
- perplexity.aibut cannot express alternative or compound signatures such as:
referrer = perplexity.ai
OR utm_source = perplexityor:
referrer = qwant.com
AND utm_source = qwant
AND utm_campaign = ai_chatAdding qwant.com directly to the AI assistant domain list would be incorrect because it would also classify ordinary Qwant Search traffic as AI traffic.
What should happen?
Matomo should support structured AI assistant signatures based on:
- one or more accepted referrer hosts;
- one or more required destination landing parameters;
- optional acceptance of an empty referrer;
- multiple alternative signatures for the same assistant.
Suggested matching semantics:
- definitions under one assistant use OR semantics;
- conditions inside one definition use AND semantics;
- accepted values for one parameter use OR semantics;
- AI assistant detection remains higher priority than campaign and search-engine attribution.
Example definitions:
Perplexity:
-
urls:
- perplexity.ai
-
landing_params:
utm_source:
- perplexity
Qwant Chat IA:
-
urls:
- qwant.com
- www.qwant.com
allow_empty_referrer: true
landing_params:
utm_source:
- qwant
utm_campaign:
- ai_chat
Qwant AI Flash:
-
urls:
- qwant.com
- www.qwant.com
allow_empty_referrer: true
landing_params:
utm_source:
- qwant
utm_campaign:
- ai_flashBackward compatibility
Existing scalar domain definitions should remain supported:
ChatGPT:
- chatgpt.com
- chat.openai.comExisting Matomo installations may also contain previously synchronized AI definitions stored as a flat domain => assistant name map. These stored definitions should remain readable.
Existing attribution such as:
utm_source=chatgpt.comshould continue to work.
Additional implementation consideration
AI classification results must not be cached using only the HTTP referrer URL once landing-page parameters affect attribution.
For example, these two visits share the same referrer but must not reuse the same classification:
https://www.qwant.com/ + utm_campaign=ai_chat
→ Qwant Chat IAhttps://www.qwant.com/ without AI parameters
→ Qwant SearchThe cache key should therefore include the relevant landing query or normalized AI-signature inputs.
Related work
Definitions proposal and example signatures: https://github.com/eldk/searchengine-and-social-list/pull/1
Matomo core proof of concept with unit and integration tests: https://github.com/eldk/matomo/pull/3
Existing proposal to support campaign parameters in AI assistant definitions: https://github.com/matomo-org/searchengine-and-social-list/issues/115
Existing Perplexity attribution issue: https://github.com/matomo-org/matomo/issues/24286
Existing narrow Perplexity fix: https://github.com/matomo-org/matomo/pull/24662
Matomo version
Observed with Matomo 5.x.
Validations
- I have checked that this is not solvable by adding the shared provider domain to the current AI assistant list.
- Ordinary search-engine traffic must remain distinguishable from AI-generated traffic.
- The proposed format remains backward-compatible with existing domain-only definitions.
- A proof of concept and regression tests are available in the linked draft PRs.
Source: matomo-org/matomo