I added two options to the Privacy settings page:
When these are activated, the visitor's original IP address is used to determine location and/or ISP, in order to get a more accurate value.
The IP address saved in the log_visit
table will honor the ip_address_mask_length
setting.
Thanks for the PR, very nice feature idea which was suggested few times!
Code review:
I'm working on it. Any idea for the documentation text for the use_anonymized_ip_for_visit_enrichment
setting in global.ini?
If you have enabled the Anonymize IP feature, by default, Geo Location via geoip and Provider reverse name lookups will use the anonymized IP address. You can set this setting to let plugins use the full IP address when enriching visitor information. Note: the IP will always be stored anonymized in the database.
Requested changes done and commits squashed into one. Ready to merge.
I've been testing it on my running piwik instance. Everything's OK so far.