Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Sandbox" Google Analytics for security

By including Google Analytics in a website (specifically the Javascript version) isn't it true that you are giving Google complete access to all your cookies and site information? (ie. it could be a security hole).

Can this be mitigated by putting Google in an iFrame that is sandboxed? Or maybe only passing Google the necessary information (ie. browser type, screen resolution, etc)?

How can someone get the most out of Google Analytics without leaving the entire site open?

Or perhaps passing the data through my own server and then uploading it to Google?

like image 560
Justin Cloud Avatar asked Apr 16 '26 10:04

Justin Cloud


1 Answers

You can create a scriptless implementation via the measurement protocol (for Universal Analytics enabled properties). This not only avoids any security issues with the script (although I'd rather trust Google on that), it also means you have more control what data is submitted to the Google Server.

like image 144
Eike Pierstorff Avatar answered Apr 19 '26 01:04

Eike Pierstorff