How to make Piwik treat IPv4-in-IPv6 notation as IPv4 addresses?

This is very annoying to me. Piwik is treating IPv4-in-IPv6 notated IPv4 addresses as IPv6 addresses. This causes that some functionality of Piwik is leaking. For example the usermap/location.

Is there a chance to make Piwik treat IPv4-in-IPv6 notation as IPv4 addresses? Some kind of hidden config option?

It not a “vodoo” patch. It’s ony something like an RegEx and Piwik is working proper again:


s/^::ffff:([0-9\.]+)$/$1/

PLease give example + Screenshots showing the problem

I have attached the three most anoying “bugs” with IPv4-in-IPv6 notation.

Could you post what the “Visitor Log” looks like ?

Shure…

Have you setup the City database from maxmind? more info at: Geo Locate your visitors - Analytics Platform - Matomo