wernerjoss / grav-plugin-ipcount

The IPcount Plugin is for Grav CMS. It counts the visitors on your Website
MIT License
3 stars 1 forks source link

IP count couts way high [feature request to fix] #6

Open grahamIT opened 1 year ago

grahamIT commented 1 year ago

When I am running ip count on my local machines it was showing 30-50 ips when I was just editing pages. Is there a way to make it only count a unique ip once in a period of time? I was thinking it could keep track of the number of IPs that visited a page in one day and then it could reset at midnight.

wernerjoss commented 11 months ago

well, there could be another strategy to count IPs. ATM, this is session-based, so, as long as the visitor uses a single session, count is not increased on multiple visits - see file classes/IPCounter.php. Just repeated the Test on my own site - once visited, the count does not increase when I click other pages, no matter how many - only if I close the browser Tab, and then come back, count is increased by 1 - I think this makes sense. Tracking IPs for e.g. a day is also possible, of course, but then it is not a real visits count, but rather a distinct visitors per day count.