谷歌分析页面名称
大家好,是否可以使用当前正在跟踪的页面的其他名称来代替 url。
我问的原因是我没有实现友好的 url slugs,而是我们有 Products/Details/100
或任何调用的页面。因此,当您登录 Google Analytics 时,您可以在 Products/Details/100
上看到 10,000 个点击,但如果不查看数据库,您不知道那是什么产品。
那么有没有什么方法可以将页面名称注入谷歌跟踪脚本中,或者我应该只实现友好的 url slugs?
提前致谢
Hey guys, Is it possible to use another name for the page that is currently being tracked instead of the url.
The reason I ask is that I have not implemented friendly url slugs instead we have Products/Details/100
or whatever the page is called. So when you login to google analytics you can see 10 000 hits on Products/Details/100
but you do not know what product that is without looking in the DB.
So are there any ways of injecting a page name into the google tracking script or should I just implement friendly url slugs?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为如果您只实现 URL 会更容易、更安全。
之后,请阅读这篇有关规范页面的帖子。
I think it would be easier and safer if you just implemented the URLs.
After that, read this post about canonical page.
当您首次调用 pageTracker 时,如果您不想使用当前请求,则可以指定自己的 url。请参阅有关 trackPageview() 的文档 详细方法。
When you make the initial call to the pageTracker you can specify your own url if you don't wish to use the current request. See the documentation on the trackPageview() method for details.