Skip to content

[Patch available] --enable-bots: Support Custom Dimensions as replacement for deprecated Custom Variables #392

Description

@ManuShift

--enable-bots does not work on Matomo 5.10 (Custom Variables deprecated)

On Matomo 5.10 the CustomVariables plugin is no longer part of core and must be installed separately from the Marketplace. When the plugin is not available, --enable-bots silently fails to store any bot information.. the flag still includes bot traffic, but the _cvar data is discarded by the tracker.

Proposed fix

Extend --enable-bots to optionally accept a Custom Dimension ID:

--enable-bots → existing behavior, backward compatible
--enable-bots=1 → stores the classified bot name in Custom Dimension 1 (recommended for Matomo 5.*)
This adds a built-in bot classification table (GPTBot, Bingbot, ClaudeBot, SemrushBot, etc.) and uses dimension{N} in the tracker request instead of _cvar.

Non-bot visits receive Not a Bot in the dimension, allowing easy segmentation.

Motivation

Custom Dimensions are the official replacement for Custom Variables in Matomo 5 (see deprecation notice). The log importer should reflect this.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions