Is there a way to count the number of page visits/views for a blog, so that the counter is incremented on every visit and the value is stored in the panel?
I was looking around the forums and it seems no-one ever encountered this problem.
Is there a way to count the number of page visits/views for a blog, so that the counter is incremented on every visit and the value is stored in the panel?
I was looking around the forums and it seems no-one ever encountered this problem.
I wouldn’t save this kind of information in my page tbh, but use a dedicated solution for that such as matomo instead.
If you’ld really would like to do so, have a look at https://getkirby.com/docs/reference/page/increment
If you just want a very basic thing like displaying every page visit, no matter if the user just reloaded the page, then you can simply on each visit increment a counter field in the page.
But note that this is a really stupid solution because it doesn’t make any difference whether a user is coming to the page for the first time or whether they are refreshing the page a million times to see the page number increase because they are horribly bored.
So the question is: what is the purpose of such a counter and what is your use case.
There used to be a simple solution for Kirby 2 that didn’t require you to use an analytics tool but was still a bit more “sophisticated” than just stupidly counting page impressions. You could update such a solution for Kirby 3 easily.