How to Show Correct IP Addresses in Matomo When Using Cloudflare

How to Show Correct IP Addresses in Matomo When Using Cloudflare

Hey everyone,

I’m currently using Matomo with Cloudflare, but I’m facing an issue where visitor IP addresses are not displaying correctly. Instead, I see Cloudflare’s IPs. I’ve come across some solutions, but I’m looking for the best approach.

Here’s what I’ve tried so far:
:heavy_check_mark: Enabled “Use Anonymized IP Addresses” in Matomo settings.
:heavy_check_mark: Checked Cloudflare’s real IP header settings.
:heavy_check_mark: Explored modifications in config.ini.php to detect the correct visitor IP.

Does anyone have a tested solution for ensuring Matomo logs real visitor IPs behind Cloudflare? Any guidance would be greatly appreciated! :raised_hands:

Thanks in advance! :blush: