Hiya! I’ve been wondering how exactly stats are counted in Writefreely generally (i.e not just on Write.as)
I read some things about there being serverside and clientside counting using JS but I’m not sure whether that applies universally, really I’m just looking for what counts/doesn’t count as a view in plain writefreely behind a reverse-proxy (caddy)
for context I am forwarding the real IP headers, but I also don’t know whether WF uses that nor whether it even counts by IP at all
just all kinds of confused, some insight would be appreciated
Hey! The stats in WriteFreely are pretty straightforward, and all happens server-side. These few conditions need to be met for a page view to count:
The post is viewed on the web (i.e. not via the API, fediverse, RSS, email, Gopher, etc.)
It’s the fully-rendered post (i.e. not the raw version you can see by appending .txt or .md to the post URL)
The post isn’t retrieved with a HEAD request
The User-Agent isn’t a well-known bot (as defined in this library, which is admittedly a little outdated)
Besides that, there isn’t much to it. It’s really meant to count page views and not unique visitors (or visitors at all), as that would require much more sophistication. So IP address, etc. is all irrelevant, as far as stats go.
Hope that helps! Let me know if you have other questions.