Skip to content

Detect Google-GeminiNotebook user agent - #1

Merged
eldk merged 2 commits into
masterfrom
agent/add-google-gemini-notebook
Jul 25, 2026
Merged

Detect Google-GeminiNotebook user agent#1
eldk merged 2 commits into
masterfrom
agent/add-google-gemini-notebook

Conversation

@eldk

@eldk eldk commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Google renamed the Google-NotebookLM User-Agent token to Google-GeminiNotebook.

This change:

  • recognizes the current Google-GeminiNotebook token as an AI bot;
  • keeps support for the former Google-NotebookLM token during the transition;
  • adds unit-test coverage for both tokens.

Expected behavior

Google-GeminiNotebook -> AI bot: true
Google-NotebookLM     -> AI bot: true

No name normalization is needed in the PHP tracker because isUserAgentAIBot() only returns a boolean. Bot-name normalization remains handled by Matomo core and Device Detector.

Related work

Validation

The branch diff is limited to:

  • MatomoTracker.php
  • tests/Unit/MatomoTrackerTest.php

Automated tests have not yet been run for this repository.

Google documentation: https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers#gemini-notebook

@eldk
eldk marked this pull request as ready for review July 25, 2026 22:12
@eldk
eldk merged commit 500db43 into master Jul 25, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant