Question

I need to track the referring website when someone comes in, including pick up keywords if I can via the referer. I need to use Google Analytics in Javascript to do this so that it's stored in that GA report, but then I want to also pass this along to my MySQL database to store it with a completed form, for instance. (The site is composed in PHP.)

I heard that Google recently changed the referer for privacy reasons, but I didn't know if that affected Google Analytics API or not. Is it possible to use GA API to get the full referer including the keywords used on the Google search engine?

Was it helpful?

Solution

Google recently changed to defaulting to SSL for logged-in users. That means anyone who is logged in will show up as a referring from "https://google.com/".

Google Analytics is smart enough to be able to tell it's organic traffic, but no - you won't get the keywords.

For storing it locally - why? You can export it from GA, and if you're trying to track events, Google Analytics has functionality for that, so you can segment visits that complete your form: http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top