简体   繁体   English

从网站内部访问Google Analytics(分析)数据

[英]Accessing Google Analytics data from within site

I'm looking to pass the current traffic source/medium through a contact form on a site (hidden field). 我希望通过站点(隐藏字段)上的联系表传递当前的流量来源/媒介。 I know that GA is tracking the data, and I wasn't sure if there was a method to get data from the current session from any of the ga javascript objects. 我知道Google Analytics(分析)正在跟踪数据,因此我不确定是否有一种方法可以从任何ga javascript对象中从当前会话中获取数据。

The idea is that if I can get easy access to it, I can just put it straight into the form to track it from my own backend. 想法是,如果我可以轻松访问它,则可以将其直接放入表单以从自己的后端进行跟踪。 Any thoughts? 有什么想法吗?

Google Analytics uses cookies for tracking data -- see http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html for names & descriptions of cookies used. Google Analytics(分析)使用Cookie来跟踪数据-有关所使用Cookie的名称和说明,请参见http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html

The __utmz cookie contains source/campaign/medium data -- http://www.randycullom.com/chatterbox/archives/2008/10/google_analytic.html has a good breakdown of the data inside the Google Analytics cookies.. __utmz cookie包含源/运动/介质中的数据- http://www.randycullom.com/chatterbox/archives/2008/10/google_analytic.html有谷歌分析的Cookie中的数据的一个很好的细分..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM