matomo-org / matomo-org/plugin-TrackingSpamPrevention

Feature request: Exclude by dimensions

Open
#162 24 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
18
Forks
10
Avg merge
20h 11m
Merged PRs (30d)
1

Description

I installed the [Tracking Spam Prevention](https://plugins.matomo.org/TrackingSpamPrevention) plugin to block bots, but it sadly lets many bots through, since bots have gotten better at disguising themselves, for example by using testing tools such as Playwright and Cypress, and routing the bots through residential and cellphone proxies, only using an IP address a few times.

So we need a new dynamic method to detect and block bots from getting counted, customisable by the user on the fly, to allow matching and blocking the bots du jour.

See also:
- https://github.com/matomo-org/matomo/issues/24406

## Proposal

**Exclude by dimension feature**
Cloaked bots usually share certain characteristics, like resolution, country and browser version, and we could add a customisable "Exclude by dimension"-option to the Tracking Spam Prevention plugin.

The user should be able to combine dimensions like below, since some bot dimensions seem to go together (April 2026):
- Country: USA -AND- Resolution: 1920x1080 -AND- Browser version: 146.0
- Country: China -AND- Resolution: 3840x2160

June 2026: They regularly switch, so now 375x812 is used.

The GUI to create an Exclude by dimension-rule should be identical to the Privacy > GDPR Tools, so that as many dimensions as possible are available. Those that are not relevant, like Date should not be available.

A rule should be allowed to cover all, or just a single web site.

**Log blocked bots**

It would be nice if these blocked bots were getting logged, so the user can track if the "Exclude by dimension"-rules work as intended, blocking bots while counting real user visits.

Since this is a separate feature, it will be handled in this issue:
- #168

**Dimension metric abnormalities widget**
A great tool which could make a Matomo administrator aware of a bot attack, would be if all dimensions were monitored behind the scenes, and if a dimension metric (like a specific resolution) makes a huge jump, it would be immediately obvious.

Since this is a separate feature, it will be handled in this issue:

- #167

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Tracking Spam Prevention plugin and the existing Privacy > GDPR Tools interface, then use the proposal and linked issue #24406 to clarify the scope. Done should provide configurable rules combining relevant dimensions, with rules applying globally or to a single website; bot logging (#168) and the abnormalities widget (#167) are separate issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
analytics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.