Visit split in two because Visitor IP changed

I’ve been wondering for weeks why in Matomo some visitors are split into two, until I realized that in these cases Cloudflare assigns different IPs for two POST processes, which are then counted in Matomo as two events from different visitors , even though it’s the same. How can I prevent this? Or what could be the reason in the few cases?

172.70.246.165 - - [05/Jun/2023:15:23:51 +0200] "POST /stats/matomo.php?e_c=
172.70.246.164 - - [05/Jun/2023:15:23:51 +0200] "POST /stats/matomo.php?action_name=

1 Like

Sorry. I don’t have access to these options, nor do I have the expertise.

In addition, it would not be good for the performance of the website. Is there another possibility why in most cases the IP of the POST is the same and in rare cases a new IP is assigned?

This is something you need to configure at your origin server.

In that case you should probably hire someone to help manage your server.

This would not affect performance.

No. It is for the reason mentioned in the documentation I linked. Each Cloudflare server has a different IP address that is used when sending requests to your origin server. Clients may connect to multiple Cloudflare servers over the course of a session. Therefore a client may appear to have multiple IP addresses over the course of a session. These are not the clients’ real IP addresses.

This can be solved simply by restoring the original client IP address using one of the methods in the documentation I linked above.

4 Likes

Thank you for explain this.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.