这个问题,我希望跟踪页面浏览量。但是,与此问题不同,我想使用MySQL来存储数据。您如何建议我设置了我的桌子以有效地沉迷于与该具体页面相关的数据?

我还想将一些“智能”应用于页面计数器。除了整体页面视图之外,如何跟踪唯一的页面浏览量(类似于SO)?我应该如何从上面修改表以适应这些更改?

另外,我可以使用这些信息跟踪广告“视图”?如果是这样,怎么样?如果没有,那么我很乐意发布,就像另一个问题一样。

谢谢。

有帮助吗?

解决方案

This could be the structure of the table you would record every-single-hit.

id | date | ip | user-cookie | agent

And then for performance reasons you could have another table that would be updated by a cron-job.

id | unique-hits

How to define a unique user?
This is a bit of a grey area where your own levels of paranoia kick in. A unique user can be a registered user and that should count as really one hit per user. You can follow the flawed one ip / one user. You can mix and match IP's and user agent's to try and better debunk unique users. Time can also be put into the mix, say every IP after x days will count as a new user.

Do you have a digital fingeprint?
Flash version, and other odities may cause your browser to be "different" from all other browsers creating a more unique view of yourself. Hit the great https://panopticlick.eff.org/ for a preview of what you may look like to a server.

How does Google Analytics does it?
Aparenttly they go cookie all the way.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top