-
Notifications
You must be signed in to change notification settings - Fork 19
Don't try to detect a campaign if core detected an AI agent #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc2f9a5 to
7bb13e8
Compare
james-hill-matomo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a quick glance. I can run & test the code tomorrow.
Please bump the version number and update the changelog - the next release date is 2025-10-13
AltamashShaikh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| yield 'utm_source param provided by Perplexity is detected as AI assistant' => [ | ||
| 'https://www.example.com/?utm_source=perplexity.ai', | ||
| '', // no referer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgiehl Should we add 1 more case where utm_source is something else like should_not_be_Recorded and referrer is AI ?
AltamashShaikh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left 1 optional comment, as James mentioned update the version and changelog, so that we can release it on coming Monday
AltamashShaikh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left 1 optional comment, as James mentioned update the version and changelog, so that we can release it on coming Monday
|
This was a beautiful PR, the comments in the code anticipated any questions or complaints I might have in advance, and it's very clear. I do wonder if "campaigns" should never have been conflated with "referrers", but it works well enough and is completely out of scope for this ticket. |

Description
ChatGPT and Perplexity are often providing a
utm_sourcewhen referring to external sites.Matomo meanwhile detects those as AI Assistants. However, this plugin currently would overwrite the detection again as campaign, which needs to be avoided.
The implementation is very hackish, as a proper solution would need so bigger refactoring in core. This will be covered in matomo-org/matomo#20067