将标识符添加到浏览器书签
有没有一种方法可以在浏览器中为页面 URL 添加书签时自动将标识符附加到页面 URL,也许是文档头中的某些内容为浏览器提供了指令或 onBookmark JavaScript 类型的事件?我正在寻找在 Google Analytics 中进一步细分直接流量的方法(如果您有其他与书签无关的想法,也请分享)。
示例:
http://www.example.com/article
添加书签后变为:
http://www.example.com/article#bookmarked
Is there a way to automatically append an identifier to a page URL when it is bookmarked in the browser, perhaps something in the document head that gives the browser a directive or an onBookmark JavaScript type of event? I'm looking for ways to further segment my direct traffic in Google Analytics (if you have other ideas for doing that not related to bookmarks, please share them as well).
Example:
http://www.example.com/article
When bookmarked becomes:
http://www.example.com/article#bookmarked
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你不能可靠地完成你所描述的事情。您能做的最好的事情就是在页面上设置一个使用 window.external.AddFavorite 的按钮,然后指定您的哈希地址。它对于使用该按钮的人来说是有用的,这可能比没有好。
I don't think you can reliably do what you're describing. The best you could do is have a button on your pages that uses window.external.AddFavorite, and then specify your hashed address. It will work for the people who use the button, which may be better than nothing.
请记住,书签流量不仅仅是直接流量的一部分。
Justin Cutroni 的博客中有一个很好的演示 Google Analytics(分析)跟踪书签访问,事实证明,大多数时候,书签访问显示为自然访问(如果您认为,人们首先进行 Google 搜索,然后为您的网站添加书签)。
Keep in mind that bookmark traffic is not simply part of your direct traffic.
There is a nice demonstration in Justin Cutroni's blog how Google Analytics tracks bookmark visits and it turned out, that most of the time, bookmark visits are shown as organic (if you suppose, that people first do a Google search and then bookmark your site).