arnoson / kirby-stats

Simple and privacy friendly web statistics for Kirby CMS.
MIT License
8 stars 0 forks source link

Idea: Add config option to enable/disable statistics #19

Closed grommasdietz closed 8 months ago

grommasdietz commented 8 months ago

It would be nice to have a kirby config option to enable/disable statistics. This would easily avoid counts on development.

We could disable on local environments (e.g. config.example.test.php):

'arnoson.kirby-stats' => [
  'enabled' => false,
],

And enable it on server (e.g. config.example.tld.php):

'arnoson.kirby-stats' => [
  'enabled' => true,
],
arnoson commented 8 months ago

Sounds great! Do you wan't to create a PR? Otherwise I can look into this as soon as I find some time. I guess the best place for this check would be in the handle method where we also check for logged in users

grommasdietz commented 8 months ago

Created a pull request!