How to anonymize IP logging by google analytics?
You can do that using the google analytics module. Enable the module and go to /admin/config/system/googleanalytics, there put your ga id in the textfield then there is a Privacy vertical tab. In that tab there is this checkbox which says Anonymize visitors IP address