I found an interesting plugin called IntranetSubNetwork on the Piwik trac ticket #1054. I was thinking that this would be perfect to adopt it to my needs to determine between IPv4 and IPv6 users on my site. Those needs were already specified in a feature suggestion for Piwik.
So I took the plugin and put it on a Github repository: pklaus / IntranetSubNetwork.
With the plugin you’re able to assign each visitor to a ‘network category’ according to the range his or her IP belongs to. The network category name will then be stored in the Piwik database in the column location_ip of the table piwik_log_visit.
