I would like to count the number of unique visitors and store that number in my database. I know that I can get the ip address with
request.remote_addr
so my default plan would be to store this address with a timestamp in my database. For any new visitor I would than compare whether this ip address has already been added with a timestamp less than 1 day old. This would give me the number of visitors per day.
However, I have the feeling this is a problem where others probably came up with better solutions already? Any suggestion how to do this better?
p.s. I just need a rough estimate for the number of unique visits, so the fact that ip addresses are not a good measure is not that concerning to me... but if you have better suggestions I am definitely interested