Amit Ugle
Amit Ugle

Reputation: 139

Mautic : Incorrect IP Tracking

Mautic is not tracking individual IP addresses for visitors. It shows only 1 IP for all visitors.

162.241.252.242 - this is IP I see no matter where the visitor came from. I have even changed cloudflare settings to BYPASS the CACHE fro Mautic TRacking URL.

What else can i do? Any tips? I would love to track IPs of individual web visitors.

ThanksMautic Incorrect IP

Upvotes: 0

Views: 365

Answers (1)

vicentemovil
vicentemovil

Reputation: 11

While this is not a permanent solution, you can add HTTP_CF_CONNECTING_IP to the array $ipHolders in line 92 of the file /app/bundles/CoreBundle/Helper/IpLookupHelper.php.

The array should look like this:

$ipHolders = [
    'HTTP_CF_CONNECTING_IP',
    'HTTP_CLIENT_IP',
    'HTTP_X_FORWARDED_FOR',
    'HTTP_X_FORWARDED',
    'HTTP_X_CLUSTER_CLIENT_IP',
    'HTTP_FORWARDED_FOR',
    'HTTP_FORWARDED',
    'REMOTE_ADDR',
];

This will place HTTP_CF_CONNECTING_IP as the first option when searching for the users' real IP address.

Upvotes: 1

Related Questions