[英]Google Analytics setup (advanced Javascript)
I have three buttons on my website, all of the buttons opens a pop up contact form. 我的网站上有三个按钮,所有按钮都会弹出一个弹出的联系表单。
The three buttons are for different things eg: 这三个按钮用于不同的事情,例如:
Request a call Get a brochure Visit us 请求电话获取宣传册访问我们
But they all open the same form; 但他们都打开了同样的形式; What I want to do is use Google analytics to track the form and know what button they originally clicked;
我想要做的是使用Google分析来跟踪表单并知道他们最初点击的按钮; is this possible?
这可能吗?
Can an onClick function be used on the button or something? 可以在按钮上使用onClick功能吗?
Really need some help on this! 真的需要一些帮助!
yes it's posible... '_trackPageview' it's your what are you looking for 是的,它是可行的......'_trackPageview'这是你在寻找什么
check this links: 检查此链接:
Official: 官方:
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867 http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867
Others: 其他:
http://viget.com/advance/how-to-track-internal-links-in-google-analytics (recommended) http://viget.com/advance/how-to-track-internal-links-in-google-analytics (推荐)
http://www.pointit.com/how-to-track-button-clicks-with-google-analytics/ http://www.pointit.com/how-to-track-button-clicks-with-google-analytics/
Event tracking would be a better option since it won't over-inflate your pageviews. 事件跟踪是一个更好的选择,因为它不会过度夸大您的综合浏览量。 You can also set events as goals now .
您现在还可以将事件设置为目标 。
<a href="#" onClick="_gaq.push(['_trackEvent', 'Contact Form', 'Button Click', 'Request a call']);">Request a call</a>
See the Event Tracking Guide 请参阅“ 事件跟踪指南”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.