Cloudflare Docs
Visit Support on GitHub
Set theme to dark (⇧+D)

How to configure Matomo for use with Cloudflare

​​ Overview

Matomo (formerly Piwik) works well behind all proxies, load balancers, which are used to make websites faster, secure and more resilient. If you wish to use Matomo on your server hosted behind Cloudflare:

1. Restore the real IP addresses of visitors to populate through to logs, stats, and more. Either restore these IP addresses yourself or ask your hosting provider to do it for you. If this is not installed you will only see the default IP addresses that belong to Cloudflare in your Matomo visitor logs.

2. In your Cloudflare domain, go to Speed > Optimization and make sure that Rocket Loader is set to Off.

Matomo should then work on your server installed behind Cloudflare proxies. If you have any question, you can get  free support in Cloudflare forums or in the  Matomo forums.