By default, a configured Tracker Proxy forwards the visitor’s IP address to Matomo. If IP anonymisation is enabled, Matomo anonymises the address after it receives the tracking request.

If a stricter privacy model is required where the IP address never reaches Matomo, you can enable the opt-in privacy feature in the Tracker Proxy. It will then remove the visitor IP address before forwarding the tracking request.

This guide explains how to configure the Tracker Proxy to prevent visitor IP addresses from reaching Matomo.

Enable the Tracker Proxy privacy feature

The privacy feature is optional and disabled by default. Existing Tracker Proxy behaviour is not affected and remains unchanged.

Only enable the feature if your organisation requires that visitor IP addresses never reach Matomo. If IP anonymisation within Matomo already meets your privacy requirements, you do not need to apply the configuration described below.

To understand the changes that will occur with request processing, IP-based features and reporting, see How the privacy feature works.

Before you start, ensure that the Tracker Proxy is configured with a valid authentication token. For implementation guidance, refer to the setup guide.

  1. Open the proxy.php file in your Tracker Proxy installation.
  2. The $MATOMO_URL should be set to the URL of your Matomo instance.
  3. Check the $TOKEN_AUTH has the token_auth for the dedicated Matomo user configured for the Tracker Proxy.
  4. Change the variable $REMOVE_VISITOR_IP to true to prevent the Tracker Proxy from forwarding visitor IP addresses to Matomo. By default, this setting is false.
  5. Save the changes.
  6. Send a test tracking request and verify that tracking continues to work as expected.

How the privacy feature works

When enabled, the Tracker Proxy prevents the visitor’s IP address from reaching Matomo. It sends the IP address cip=0.0.0.0 to Matomo instead of the visitor’s IP address. This applies to both individual and bulk tracking requests.

Any forwarded IP header configured through $http_ip_forward_header is ignored. As a result, the original visitor IP address never reaches Matomo.

Authenticated requests supplying their own cip value

If an authenticated tracking request explicitly supplies its own cip parameter, the Tracker Proxy forwards it unchanged. This behaviour allows trusted server-side applications to intentionally provide a specific IP address.

Do not remove the Tracker Proxy authentication token. Matomo rejects unauthenticated requests containing a cip parameter and the tracking request will fail.

Tracking Spam Prevention

If you use Tracking Spam Prevention, do not apply the setting Max actions to record per visit with the Tracker Proxy privacy feature.

The proxy replaces every visitor’s IP with 0.0.0.0. If a visitor exceeds the defined maximum actions, Tracking Spam Prevention will block the IP. Once that placeholder IP address is blocked, all subsequent tracking requests from all visitors will also be blocked.

  1. To check the setting, open Administration admin gear icon > General settings > System > Tracking Spam Prevention.
  2. Max actions to record per visit is 0 by default. Do not define a maximum value when enabling the Tracker Proxy privacy feature.
    max actions to record per visit

Impact on reporting and visitor identification

The Tracker Proxy privacy feature provides a stronger privacy model for organisations with strict privacy requirements. Matomo never receives the visitor IP address, so features that depend on it will be affected.

Review the following impacts before enabling $REMOVE_VISITOR_IP.

Feature Impact
Location reports Country, region, city, continent, maps, and location widgets appear as Unknown.
Location-based segments Location-based segments cannot identify the visitor’s location.
Visitor IP Visitor IP addresses shown in reports, APIs, and segments display 0.0.0.0 instead of the visitor’s IP address.
Provider reports (only applicable if using the On-Premise Provider plugin) ISP and organisation information appears as Unknown.
IP exclusions IP-based exclusion rules cannot distinguish individual visitors because all standard tracking requests use 0.0.0.0.
Tracking Spam Prevention IP-based spam and bot controls cannot distinguish individual visitors using their IP address.
Cookieless visitor recognition Visitor recognition may be less accurate when cookies or other visitor identifiers are unavailable because the visitor IP address is no longer available as a fallback identifier.

This can affect metrics such as Visits, Unique Visitors, Returning Visitors, Bounce Rate, Visit Duration, and attribution for Goals, Funnels, and Ecommerce.

Unlike IP anonymisation, which anonymises the IP address after Matomo receives it, this privacy feature prevents the original IP address from being processed by Matomo.

This is intended for organisations with strict privacy or regulatory requirements that prohibit the original visitor IP address from being processed by any analytics application.

Previous FAQ: Set up a Tracker Proxy on your domain using Matomo Tag Manager