Thank you.
The script is effective in the
if (!is_admin())
section.
So it should not count if you are logged in as admin.
Can you tell how you know it counts admin visits?
Are you using some page cache plugins?
Once a page is cached, is_admin() is not effective.
Please let me know.
C.
Thread Starter
vlp
(@vlp)
I use litespeed cache. I can tell by the visitors table – I’m logged in as admin, visit the site and visitor count jump up +1 (tried at night where there are no other visits on site).
If I close the window and reopen new one, the visit is not counted – but after some time (I did not check exaclty how long in take) the visit is counted again.
That is because LS caches the atec-stats JS script in the page cache. Thus there is no is_admin check at this point. So whether you are logged in or not does not make a difference.
However on the plugin side I could skip counting if logged in, that’s an option.
The other effect you observed is, that the script only fires if there is some interaction on the page, this is to skip fake request from robots and the like.
The new version will be out soon.