Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics - can it collect form data?

Simple scenario: I have a signup form, with user name, password, email address, may be credit card number.

At the bottom of the page, I implement the Google Analytics code.
when user clicks submit, it goes to a page wihtout google analytics.

question is.. can GA get the data (user naem, password..email..etc) in the first form after user input the data?

Do they say anything about it in their TOS or Privacy policy?

like image 519
Murvinlai Avatar asked Nov 25 '09 22:11

Murvinlai


1 Answers

Yes. Any <script> you include in the page has complete access to alter the user's interaction with the site due to the Same Origin Policy. Google, if they were feeling Evil today, could certainly rewrite the action of your <form> to point to themselves, or log every keypress, or create an <iframe> containing another page on your site and simulate the user clicking on any action in that page.

Do not include <script> on any page from a party you don't completely trust with the security of everything on your site. Even a single tracking or advertiser script on any page compromises everything on the same hostname (and maybe other subdomains if you are setting window.domain to allow cross-hostname-scripting, or sharing cookies between hostnames).

However, the Analytics script doesn't currently do any of these things and the form submission will not flow to Google as a matter of course; they would have to deliberately act to steal the data. Clearly it would be disastrous for them to be discovered doing it, so they presumably won't. But technically, they could. It always pains me to see third-party ad and tracking scripts on bank sites.

like image 174
bobince Avatar answered Oct 21 '22 15:10

bobince