Skip to content

Add method to track an AI bot request, if the current user agent is a known AI bot#148

Open
diosmosis wants to merge 13 commits intomasterfrom
track-if-ai
Open

Add method to track an AI bot request, if the current user agent is a known AI bot#148
diosmosis wants to merge 13 commits intomasterfrom
track-if-ai

Conversation

@diosmosis
Copy link
Copy Markdown
Member

Description

Changes:

  • Add doTrackPageViewIfAIBot & getUrlTrackAIBot methods for sending AI bot tracking requests server side.
  • Add isUserAgentAIBot static method for checking if a user agent matches a known AI bot.

Checklist

  • [✔/✖/NA] I have understood, reviewed, and tested all AI outputs before use
  • [✔/✖/NA] All AI instructions respect security, IP, and privacy rules

Review

@diosmosis diosmosis marked this pull request as draft December 12, 2025 06:58
@diosmosis diosmosis marked this pull request as ready for review February 3, 2026 04:57
@diosmosis diosmosis requested a review from a team February 3, 2026 05:04
Comment thread MatomoTracker.php Outdated
Comment thread MatomoTracker.php
'Perplexity-User',
'Google-NotebookLM',
'Devin',
'GPTBot',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one too. I don’t see any reference in matomo code base.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPTBot is listed here: https://platform.openai.com/docs/bots

If it still shouldn't be tracked, let me know.

Co-authored-by: Thomas ZILLIOX <thomas@zilliox.me>
@diosmosis
Copy link
Copy Markdown
Member Author

@matomo-org/core-reviewers please review this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants