#24960·matomo

AI assistant traffic using UTM qualifiers is incorrectly attributed as campaign or search traffic

Author: eldkCreated Jul 30, 2026Updated Oct 1, 2026
LabelsEnhancement

What happened?

Matomo currently identifies AI assistant traffic mainly from:

  • the HTTP referrer URL;
  • an utm_source value that itself matches a known AI assistant domain, such as utm_source=chatgpt.com.

This is insufficient for AI platforms that:

  1. omit the HTTP referrer and use a non-domain utm_source value; or
  2. 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=perplexity

Example request:

GET /page.html?utm_source=perplexity
Referer: empty

Current result:

referer_type = 6
referer_name = perplexity

The visit is classified as a campaign.

Expected result:

referer_type = 8
referer_name = Perplexity

Qwant 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 IA

Qwant 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 Flash

Ordinary Qwant traffic without these AI qualifiers must remain classified as:

referer_type = search engine
referer_name = Qwant

Root cause

The current AIAssistants.yml format is a flat list of assistant domains.

This format can express:

yaml
Perplexity:
  - perplexity.ai

but cannot express alternative or compound signatures such as:

referrer = perplexity.ai
OR utm_source = perplexity

or:

referrer = qwant.com
AND utm_source = qwant
AND utm_campaign = ai_chat

Adding 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:

yaml
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_flash

Backward compatibility

Existing scalar domain definitions should remain supported:

yaml
ChatGPT:
  - chatgpt.com
  - chat.openai.com

Existing 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.com

should 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 IA
https://www.qwant.com/ without AI parameters
→ Qwant Search

The cache key should therefore include the relevant landing query or normalized AI-signature inputs.

Related work

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.