跟踪两个站点之间的网络流量最稳定、侵入性最小的方法是什么?
我需要跟踪一组特定网站之间的流量。 然后,我将点击次数存储在数据库表中,其中包含字段 fromSite、toSite、day、noOfClicks 。 完整的 URL 并不重要 - 只需要网站标识。
我已经排除了重定向,因为我不希望我的服务器成为单点故障。 我希望即使跟踪应用程序或服务器已关闭或过载,链接也能正常工作。
另一个目标是最大限度地减少每个参与站点为了使跟踪发挥作用而必须完成的工作。
解决这个问题的最佳方法是什么?
I need to track traffic between a specific set of web sites. I would then store the number of clicks in a database table with the fields fromSite, toSite, day, noOfClicks. The complete urls are unimportant - only web site identity is needed.
I've ruled out redirects since I don't want my server to be a single point of failure. I want the links to work even if the tracking application or server is down or overloaded.
Another goal is to minimize the work each participating site has to do in order for the tracking to work.
What would be the best way to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最好的方法是使用 Google Analytics 等分析程序,并查看每个域的报告。
The best way is to use an analytics program like Google Analytics, and to review the reports for each domain.
您是否有权访问所有相关网站的日志? 如果是这样,您应该能够从日志文件(Referer 标头)中提取该数据。
Do you have access to the logs on all of the sites in question? If so, you should be able to extract that data from the log files (Referer header).
您可以将 onclick 事件放置到每个站点之间的每个链接上。 然后 onclick 会调用一些 javascript,它可以执行服务器回调来注册点击。
You could place an onclick event on to each link that goes between each site. the onclick would then call some javascript which could do a server call back to register the click.