brandcom/silverstripe-ai-chatbot-tracking

There is no license information available for the latest version (0.1.0) of this package.

Track AI chatbot page views in Matomo for Silverstripe

Maintainers

Package info

github.com/brandcom/silverstripe-ai-chatbot-tracking

Type:silverstripe-vendormodule

pkg:composer/brandcom/silverstripe-ai-chatbot-tracking

Transparency log

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-08-11 11:58 UTC

This package is auto-updated.

Last update: 2026-08-11 12:36:54 UTC


README

This module records public frontend page views made by known AI chatbot agents in Matomo.

Configuration

Set these environment variables in the runtime .env:

MATOMO_TRACKING_URL="https://example.matomo.cloud/matomo.php"
MATOMO_SITE_ID="1"
MATOMO_BOT_TRACKING_ENABLED="true"

Tracking is disabled in the project DDEV template by default. Set MATOMO_BOT_TRACKING_ENABLED to true only when local traffic should be sent to Matomo.

The middleware tracks successful public GET requests whose User-Agent contains one of the configured AI chatbot signatures. Admin, security, development, API, and asset paths are ignored. Matomo errors and timeouts never interrupt the page request.

The default signatures can be overridden in Silverstripe YAML using the bot_user_agent_substrings configuration property.

Development

From the project root, use the DDEV web container for dependency and application commands:

ddev composer install
ddev exec vendor/bin/phpstan analyse modules/ai-chatbot-tracking/src
ddev exec vendor/bin/phpcs modules/ai-chatbot-tracking
ddev exec php modules/ai-chatbot-tracking/tests/run.php