By default, Matomo Cloud sends tracking requests from a *.matomo.cloud domain, and Matomo On-Premise sends tracking requests from the domain where the Matomo instance is hosted. Both work without a tracker proxy, but you can optionally set this up:

The tracker proxy is a set of PHP files that you deploy on your web server to align tracking requests with your website’s domain. These files forward incoming tracking requests to your Matomo instance without changing how data is processed. This places tracking in a first-party context as requests originate from the same site as your website.

  • With direct tracking, the browser sends requests directly to the Matomo endpoint, for example https://mysite.matomo.cloud/matomo.php. In this case, the tracking domain differs from the website domain.
  • When using a tracker proxy, the browser sends requests to a tracking URL on your domain, such as https://mysite.com/matomo.php. The proxy then forwards these requests to Matomo for processing.

view of matomo tracker proxy process

Consider using a tracker proxy if you use Matomo Cloud and want tracking requests to originate from your domain and require a first-party tracking setup aligned with your website’s domain.

The tracker proxy does not request data by default or modify cookie behaviour. It only affects the transport of tracking requests between the browser and Matomo and does not change how data is collected, processed, or stored.

The tracker proxy does not control when tracking starts, which cookies are set, or how consent is evaluated. Those responsibilities remain with your consent management platform (CMP) and tracking configuration. You can integrate your CMP in the same way as for direct Matomo tracking. Explore the Matomo and CMP integration guides.

Domain vs subdomain considerations

The proxy should be served from your domain with a valid SSL certificate and implemented on the same site (domain or subdomain) (for example mysite.com/matomo.php). This requires access to the web server that serves your website, as this is where the proxy files must be deployed and maintained.

Using a subdomain is supported, but you should ensure it is configured as part of the same site (to maintain first-party context). If the proxy is hosted on a completely different domain, tracking requests may be treated as third-party.

Next steps

After learning how the Matomo tracker proxy routes tracking requests and how it fits into Matomo’s tracking and consent model, you will be able to determine if its required for your setup.

To configure the tracker proxy configuration, continue with one of the following guides:

The tracker proxy is supported on Matomo Cloud or On-Premise (where your Matomo instance is reachable over HTTPS). You will need access to configure your tracking code and deploy files to your web server.