I have always been wary of putting GA code on websites... mostly because I was involved in a product that was arguably competing in some areas with Google. Now I am a little freer to broaden my horizons and find myself looking at GA through the eyes of an enquiring child.
My main interest is in seeing how I can avoid falling foul of the EU's GDPR regulations. To be ABSOLUTELY CLEAR... in my mind, if you just take Google analytics out of the box and put it on your website, YOU (not Google) are breaking the law as soon as an EU citizen comes to see your site unless you take at least SOME steps to protect or at the very least inform the visitor. This is why so many sites now show GDPR stick-up pop-ups to EU IP addresses.
The EU considers IP addresses as Personally Identifiable information... so right there, analytics systems have a problem. GA is no exception. But there are ways to mitigate the problem.
In putting this post together, I have to give credit to Brian Clifton (Author of Advanced Web Metrics with Google Analytics) who has a couple of really good blog posts with tips on the subject if you want to get into the nitty-gritty.
Option 1 (low tech): Most people just put up a banner to people visiting from EU IP addresses saying that you collect personally identifiable information. Google has plenty of help on how you can do this. But it is starting to affect the way we use the web. Everyone just feels obliged to "click accept" which goes against the policy of "informed consent". users are not informed if they do not understand what they just clicked. so in the long term, this approach sucks.
Option 2: Most people do not realize that you can
anonymize IP addresses [support.google.com] in GA. in theory, if you do that, I do not think that you need to have any message on your website about collecting personal data (due to GA at least)! Someone tell me otherwise? Surely this is a BETTER way to go than pop-ups?
Option 3: This is where I really need to give Brian kudos. The BEST way deal with GDPR and Data Privacy in general is to use Regex to block sending personal data to GA in the first place. Advanced set up of GA and Analytics means that you can be collecting personal data on your own site, but using Regex you can strip that data before Google sees it. This has to be a bit of a gold standard approach because you don't pass information to the third party at all.
I'd love to know what percentage of GA users go beyond option 1! My guess would be pretty well none, but I think we should all take up option 2. It is an easy setting in GA and frankly, they could switch it on by default.
[edited by: DixonJones at 10:32 am (utc) on May 15, 2019]