谷歌分析页面名称

发布于 2024-08-08 06:23:58 字数 294 浏览 10 评论 0原文

大家好,是否可以使用当前正在跟踪的页面的其他名称来代替 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南薇 2024-08-15 06:23:58

我认为如果您只实现 URL 会更容易、更安全。

之后,请阅读这篇有关规范页面的帖子

I think it would be easier and safer if you just implemented the URLs.

After that, read this post about canonical page.

余生再见 2024-08-15 06:23:58

当您首次调用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文