petridish icon indicating copy to clipboard operation
petridish copied to clipboard

Add Plausible analytics

Open peterdesmet opened this issue 1 year ago • 3 comments

Plausible is a cookie-free, GDPR-compliant visit stats tracking: https://plausible.io/, used e.g. by GBIF: https://plausible.io/gbif.org

peterdesmet avatar Mar 14 '23 08:03 peterdesmet

I definitely upvote this. Is there a way to integrate Google Analytics currently?

jocelynpender avatar Mar 31 '23 17:03 jocelynpender

To enable Google Analytics (GA), you can add your own _includes/footer.html (overwriting the default) that includes the GA JavaScript code.

Although I'd prefer Plausible over GA, I'm a bit reluctant to directly support it in Petridish, since it is a service you have to pay for (all other services Petridish relies on are free).

Another option is to provide a custom.js in Petridish, which users can then overwrite with whatever code they want (without having to change the footer.html). Something similar is already supported for adding custom CSS by adding a _sass/custom.scss.

Thoughts?

peterdesmet avatar Apr 04 '23 17:04 peterdesmet

I like having the flexibility of having customizable js/footer files (not sure which one is best), rather than support for a specific product.

But if you add a bit of documentation (examples) about how to use the "custom features" to implement GA and Plausible, I think we're not far from having the best of both worlds.

niconoe avatar Apr 21 '23 07:04 niconoe