Can I collect data from form fields with Google Analytics?
I have a website with a "contact me" form. Users can leave their name, email, and message and I'll get an email con开发者_运维百科taining their data.
I've set up a goal on Google Analytics for the registration and everything works fine.
Now, the question is: Can I see their names and emails on my Analytics? Is there any way to make Google Analytics save that data and show it to me?
Thanks in advance, Daniel
Theoretically this can be done using custom variables. See: http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html
However, I believe that name and email address are considered Personally Identifiable Information so sending it to Google Analytics is most likely against their Terms of Service. See section 7: http://www.google.com/intl/en/analytics/tos.html
You would need to use another tracking system such as Piwik: http://piwik.org/
You can try using event tracking.
eg.
<a href="#" onClick="_gaq.push(['_trackEvent', 'Registration', 'FirstName', $('FirstName').val()]);">Register</a>
精彩评论