客户端分析相对于服务器端有什么优势?
我一直使用客户端 Web 分析,它使用 JavaScript 来跟踪访问者对网站的点击,以及提供的所有有用信息。但有些人最近告诉我他们更喜欢服务器端分析,因为它更快。
所以我想知道使用 JavaScript 在客户端执行此操作的主要优点是什么?哪个有更多功能,为什么?
I've always used client-side web analytics that uses JavaScript to track visitor hits to the site, and all the useful information that gives. But some people have recently told me they prefer server side analytics because it's faster.
So what I wondered is what are the main advantages of doing it client-side with JavaScript? Which has more features and why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
服务器端优势:
服务器可以设置为比桌面计算机无限强大的功能,因此可以处理“大数字”。
性能可以更可预测,因为每个人都使用相同的机器来分析和生成结果。
输出不会依赖于浏览器/浏览器版本,因为它们只需要显示图像。
输出也可以是多设备,没有任何依赖。
输出可以在任何地方都是相同的,既减少了客户端问题,也使图像生成支持一种以上的输出格式。
客户端优势:
如果客户端数量很大,例如每分钟数千个,最好将处理卸载到客户端计算机,以避免它们减慢中央服务器的速度。< /p>
解决方案往往会提供更多的交互性和更快的结果,因为
首次下载后,无需在线即可更改视图。
不需要服务器端基础设施,因此不会花费成本(提供商)钱。
Server-side Advantages:
Servers can be set up with infinitely more power than desktop machines and so can crunch "the big numbers".
Performance can be more predictable as the same machines are used for everyone's analysis and generation of results.
Output will not have dependencies on browser / browser version as they just have to display an image.
Output can also be multi-device without any dependencies.
Output can be the same everywhere both reducing client issues and also making the image generation be about supporting 1 output format over many.
Client-side Advantages:
If the number of clients is large, say thousands per minute, it can be good to unload the processing to client machines to avoid having them slow down a central server.
Solutions tend to provide more interactivity and faster results as all the data and the logic is on the client.
Once downloaded initially, views can be changed without being online.
If the traffic varies a lot, say sometimes a few queries per hour, other times, hundreds per minute client-side makes sure that a central server is not over-loaded by this effort
Server-side infrastructure will not be needed and so will not cost (the provider) money.
许多公司同时使用 Google Analytics(客户端)和 Webtrends(服务器端/客户端)进行网络分析。
关于 Google Analytics 的一件事是,当用户不允许脚本时它不起作用。 Webtrends 可以抓取您的访问日志。
Many companies use both Google Analytics (client side) and Webtrends (server side/client side) to do web analytics.
One thing about Google Analytics is that it doesn't work when the user doesn't allow scripts. Webtrends can crawl your access logs.
与服务器端跟踪相比,客户端跟踪提供更多信息。
Client-side tracking provides more information in comparison with server-side tracking.