How can I Identify unique users on my website even IP is changed or browser data has been cleared?

风格不统一 提交于 2020-01-02 03:31:46

问题


I am developing a video streaming website. I want to count unique views on each video. I referred to some sites on internet and even asked some other programmers. They say either use cookies or session or IP address. But these things changes over time. Also if possible can we do this using MAC address of the user's machine? Also I came across a similar question here -> http://bit.ly/Qh1KNR. They say there is something like browser fingerprint that uses MAC address. So can you tell me what method is the best one?


回答1:


You can use Evercookie concept which stores cookie data on different storage location . If user clear browsing history or cookies , it will restore it cookies from different storage location . There is one drawback user must on javascript to create evercookie.




回答2:


Yes, all those attributes can change and there is no certain way to detect whether the same person has watched the video twice. Someone can watch it once in school and another time at home with different browsers and IP addresses.

You best bet is probably with IP-addresses, counting some people twice and skipping some people (because of NAT enabled routers).

Another way is to only allow registered users to watch videos and record what they have seen.




回答3:


You can not track a user with fingerprint. What fingerprint does is to collect some information about the operating system, time zone, fonts installed, plugins,... In some cases may work, but is not 100% true. In some eviroments (like schools, universities, etc) the operating system, browsers and almost all configuration may be the same and it is imposible for you to track an user.




回答4:


You could go deeper than just an IP address.

If this is just for tracking usage and not authentication then you can store an initial fingerprint of a user's browser based upon:

Using a plugin like: https://github.com/carlo/jquery-browser-fingerprint

  • Plugins Installed & their versions
  • Screen Size
  • Operating System (Version)

You get the point. As the likelyhood of two users having the exact same resolution, plugins (versions included), operating system (patches etc) is relatively slim.




回答5:


Why dont you store GUID along with some other parameter in cookies along with some MAC address of finger prints that will give you some control over the data to figure out the uniqueness



来源:https://stackoverflow.com/questions/12894312/how-can-i-identify-unique-users-on-my-website-even-ip-is-changed-or-browser-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!