I would like to gain some high-level insight into the traffic accessing my website. For example:
- Unique visitor counts
- Most viewed pages
- Referring sites
- Activity per time of day/week/month
I do not want to be able to track individual users - I want to keep this strictly to statistics rather than intrusive tracking. That throws out pretty much anything that involves JavaScript or stuff done on the client-side.
I've been trying to put together a solution using the AWStats log analyser, however this requires me to collect IP addresses. If I remove or obfuscate IP addresses, then the 'Unique Visitors' count doesn't work. Unfortunately it seems that AWStats uses IPs as the primary method for identifying unique visitors.
What other solutions are out there? My site is PHP so doing something myself would also be acceptable.
1. It allows single page apps to analyze
2. Caching of pages does not have any effect on the JS to be executed. Most back end tracking don't know if something is visited when cached.
So I would recommend you to use JavaScript if above reasons apply to you. As far as I know you can't really obfuscate the IP address in a why that you can't track a visitor. That's why I decided to drop IP address from our logs and don't use them at all.
Regarding your last point: unique visitors are hard to measure if you don't use IP or a cookie. A cookie is tracking, be not sure how intrusive you think this is for you. It could be a cookie with just a value of 'visited=1' or something, so you know it's a non-unique visitor when the cookie is present. That way you don't track I think.
You can see demo stats of my platform here https://simpleanalytics.io/simpleanalytics.io