jquery地址谷歌分析
我正在使用流行的 jquery 地址和 ajax 应用程序。我希望谷歌分析记录路径哈希更改,因为这些对我来说相当于新页面。
地址文档提到GA,但不明白怎么用?
http://www.asual.com/jquery/address/docs/
这个还提到了该功能,但没有解释如何进行跟踪: 如何影响分析?
I'm using the popular jquery address with an ajax app. I want google analytics to record path hash changes, as those are the equivalent of new pages for me.
The address documentation mentions GA, but I don't understand how to use it?
http://www.asual.com/jquery/address/docs/
This also mentions the feature but doesn't explain how to do tracking:
jquery deep linking - how does it effect analytics?
Do I still reference the google urchin js on my html page? Below or after address? Is the function the function that causes the page change? Can I put $.address.change() in it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要您添加了 Google Analytics 代码,该插件就会自动进行跟踪。它支持代码的所有变体(urchin、pageTracker、异步),但有两点很重要:
在插件之前。需要这个所以
该插件可以检测到
跟踪脚本。
跟踪“”的位置应该是
已删除。该插件将调用此
自动并会使用适当的
输入网站时的值
使用深层链接。
asual.com 上的所有 jQuery 地址示例都使用此跟踪功能,您可以使用它们的源作为参考。
The plugin should do the tracking automatically as long as you have included one the Google Analytics code. It supports the all the variants of the code (urchin, pageTracker, async) but there are two important things:
before the plugin. This is needed so
that the plugin can detect the
tracking script.
where the "" is tracked should be
removed. The plugin will invoke this
automatically and will use a proper
value if the website is entered
using a deep link.
All the jQuery Address samples on asual.com use this tracking capability and you can use their source as a reference.