Matomo stores from which URL (referrer) a user comes to your site. In some cases such a URL may contain information that can be considered personal information. For example a visitor might come from an ad or social network and the referrer URL might include various IDs that could identify an individual when the information is being cross referenced. Anonymizing will help prevent storing personal information that would be otherwise out of your control since you cannot control through which referrers your visitors find you and therefore you can otherwise not ensure that no personal information is being tracked.

If you want to prevent such information to be tracked, you can restrict the amount of referrer data that Matomo will store when a visitor enters your website. The more information is removed from the referrer information, the less likely personal information will be recorded. The more information you remove from the referrer, the less clear it will be how a visitor came to your website.

To anonymize the referrer follow these steps:

  • Login to Matomo as a Super User
  • go to Administration > Privacy > Anonymize data.
  • In the section “Anonymize referrer” you can configure how much you want to anonymize the referrer

There are four options available:

  • Don't anonymize the referrer. This is the default and does not anonymize anything.
  • Remove query parameters from referrer URL. This will remove all URL parameters from the referrer URL. If for example the URL is https://ads.example.com/path/1/?adid=123456 then the stored referrer URL will be https://ads.example.com/path/1/. If the referrer comes from a search engine, then the searched keyword will not be stored as a result of this. This does however not affect imported keywords from the Search Engine Keywords plugin.
  • Keep only the domain of a referrer URL. This will remove all URL parameters and the entire path from the referrer URL. If for example the URL is https://ads.example.com/path/1/?adid=123456 then the stored referrer URL will be https://ads.example.com/. If the referrer comes from a search engine, then the searched keyword will not be stored. This does however not affect imported keywords from the Search Engine Keywords plugin. Note that the entire domain (including subdomain) will still be stored and the subdomain itself could include personal information allowing someone to identify an individual. By removing the path it is less likely to store personal information since eg some ad networks may include IDs as part of the path. However, it will make it more hard to find out from which page exactly someone found you.
  • Don't record the referrer URL but still detect the type of referrer. With this setting Matomo will still detect the type of referrer (eg search vs social vs website vs direct) and it also keeps the name of which search engine or social network was used to find you. However, no URL and no keywords that were used to find you will be stored. This is the safest choice should you want to prevent the tracking of any personal information.

Matomo campaigns are not impacted by any of these settings as the campaign information is provided by the currently viewed URL and not the referrer URL. This means campaign information will always be reported (also when specifically tracking a campaign info through HTTP API tracking parameters such as _rcn).

This feature requires Matomo 4 or newer.