I’m not completely happy with the result so I would love your feedback! What is okay, what would you have done differently? I’m somehow in a “kirby fever” in the last days trying to learn some new things about it so I would really appreciate your comments.
One problem I ran into is the router: I somehow couldn’t get optional URL-parameters to work, so I have this ugly second route now. Apart from the fact that it obviously doesn’t work on multilang sites at the moment and the widget is not responsive it should do its (very basic) job.
Just a quick test on a multi language site, first I got an error which disappeared after I created a folder called stats, but now all I get is an empty widget (well, not quite, it shows the headline …) Looks like it’s missing a JS script, console tells me it can’t find variable chart …
Edit: after adding Chart.min.js to assets that error disappeared, but still no chart showing up
Maybe it was a bit early too ask for opinions… This is clearly not developed far enough. I guess I’ll go get some different installations with single and multi language to test everything properly…
I just filed an error I get when not logged in to the panel.
A suggestion: Currently, every page refresh is counted towards the stats. Maybe it would be a good idea to set a cookie for every page, I know that’s not foolproof either to get unique impressions, but maybe a bit more so ?