Docusaurus web analytics installation
- 1
Install the plugin
RequiredDocusaurus is a popular static site generator for documentation. You can add PostHog using the official plugin:
Terminal - 2
Configure the plugin
RequiredAdd the plugin to your
docusaurus.config.js:docusaurus.config.jsMore optionsSee the Docusaurus integration docs for more configuration options.
- 3
Send events
RecommendedStart your Docusaurus site and visit a few pages. PostHog will automatically capture pageviews and other events.
Click around and view a couple pages to generate some events. PostHog automatically captures pageviews, clicks, and other interactions for you.
If you'd like, you can also manually capture custom events:
JavaScript - 4
Next steps
RecommendedAfter installing PostHog and ensuring autocapture is enabled, head to your web analytics dashboard to see your data. And then check out our getting started guide.
PostHog tip: Web analytics works with anonymous events. This means if you are primarily using PostHog for web analytics, it can be significantly cheaper for you.