I'm coding a chrome extension. My extension is for free but i want people to know better about the product that I provide. So, when a user used my extension 5 times or more, I want to get the user's mail adress (i propose him to enter it). Here I come to the problem : before asking the user his mail adress, I have to count the number of times he clicked. popup.js open itself each time a user open an extension. Here my algorithm :
-> Each time popup.js open :
id = ? from the user
if id not in dico :
add ? key to the dico, with value [1, false]
else
add 1 to dico.id[0]
if dico.id[0] >= 5 and dico.id[1] == false
ask the mail
if the user entered his mail
dico.id[1] = true
add the mail to my database
My question : what could be "?" ? I want something stable, like the IP (not stable because of the VPN), or the MAC adress (impossible acces). I also want to be able to get "?" with javascript.
Thanks.