流量统计怎么准确的得到停留时间

WBOY
Release: 2016-06-13 09:59:36
Original
1061 people have browsed it

流量统计如何准确的得到停留时间
请问,流量统计如何准确的得到停留时间?我觉得就是不知如何触发浏览器关闭的状态。 考虑过js onbeforeunload onunload 但分不清刷新和关闭

------解决方案--------------------
请理解http协议的无状态特征

实现这个功能有虾米意义?
------解决方案--------------------

探讨

楼上的没接触过网站流量统计工具, ?

------解决方案--------------------
探讨
请问,流量统计如何准确的得到停留时间?我觉得就是不知如何触发浏览器关闭的状态。 考虑过js onbeforeunload onunload 但分不清刷新和关闭

------解决方案--------------------
差不多就得,太准了会死人~~~
------解决方案--------------------
1. 定时写cookie,中间丢失的也就是最后一次的定时间隔
2. 检测的上个周期的cookie时,更新到数据库,然后重复1

刷新可以认为和上次是一次停留时间,刷新的统计一般都是和相同refer合并在的一起的

------解决方案--------------------
毫无意义的工作
------解决方案--------------------
google analysis,piwik这些工具都已经有了
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!