简体   繁体   中英

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

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?

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.

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.

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.

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.

为什么不将GUID与cookie中的其他参数以及指纹的某些MAC地址一起存储,这将使您可以控制数据以找出唯一性

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM