How to track analytics on a Docusaurus-built website? #11946
Replies: 2 comments
|
You can take inspiration from existing analytics plugin we provide, based on client module lifecycle hooks:
There are many community plugins available, implemented in similar ways, for example: https://posthog.com/docs/libraries/docusaurus You have to track the navigations using client-side code |
|
For a self-hosted, lightweight, and privacy-respecting analytics solution on Docusaurus, here are the two best options, along with how to handle Single-Page Application (SPA) pageview tracking: Option 1: Umami (Recommended for Self-Hosting)Umami is completely open-source, GDPR-compliant, cookie-less, and runs easily via a tiny Docker container with Postgres or MySQL. Why it fits Docusaurus:Umami's tracking script automatically patches How to install in
|
Uh oh!
There was an error while loading. Please reload this page.
Hi,
What would you suggest to keep track of a Docusaurus-built website usage?
Being that Docusaurus generate a client app, I think that using the server logs wouldn't work as it would miss most of the page views.
We would rather use something self-hosted and simple.
Best,
Rémi
All reactions