如何获取链接点击信息?
我想知道如何从链接点击中获取信息。
例如,用户登录并单击链接。可以记录这些信息吗?点击的链接数量、哪些链接等等……诸如此类。
我不知道该怎么做。有什么想法/信息链接吗?
I am wondering how it is possible to get information from link clicks.
For example, a user is logged in and clicks a link. Is it possible to record that information? Number of links clicked, which ones, etc... things like that.
I have no idea how to do this. Any ideas / links to information?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 JavaScript 将事件绑定到链接并以这种方式完成日志记录。
请参阅此问题。
您还可以尝试在您的网站上设置 Google Analytics;这是一项免费服务,可为您的网站提供大量数据收集。这是一篇博客文章,详细介绍了 使用 Google Analytics 跟踪点击。
You could use JavaScript to bind an event to your links and have the logging done that way.
See this question.
You also might try looking at setting up Google Analytics on your site; it's a free service that offers incredible amounts of data collecting for your site. Here's a blog post that details tracking clicks with Google Analytics.
您有多种选择:
onclick
属性中执行的 JavaScript 代码更新:有
ping
属性。然后,Web 浏览器将向指定链接发送通知。不过在 HTML5 中。a
元素的You have several options:
onclick
attributeUpdate: there is
ping
attribute fora
element. Web browser will then send a notification to the specified link. In HTML5 though.一种方法是让用户通过您自己的重定向链接。因此,链接将转到 http://yourserver.com/redir.aspx?realink=< url编码链接>
One way to do that is by passing the user through a redirect link of your own. So the links go to http://yourserver.com/redir.aspx?realink=<url encoded link>