Last updated:

|Edit this page

On this page

This is a community integration that is not maintained by the PostHog core team.


yarn add posthog-docusaurus


npm install --save posthog-docusaurus

How to use

// in docusaurus.config.js
module.exports = {
plugins: [
apiKey: "<ph_project_api_key>",
appUrl: "<ph_client_api_host>", // optional
enableInDevelopment: false, // optional
// other options are passed to posthog-js init as is
// NOTE: options are passed through JSON.stringify(), so functions (such as `sanitize_properties`) are not supported.

This will automatically start tracking pageviews, clicks and more.

For more instructions, see the browser JS library.


Was this page useful?

Next article


PostHog makes it easy to get data about traffic and usage of your Flask app. Integrating PostHog enables analytics, custom events capture, feature flags, and more. This guide walks you through integrating PostHog into your Flask app using the Python SDK . Installation To start, run pip install posthog to install PostHog’s Python SDK. Then, initialize PostHog where you'd like to use it. For example, here's how to capture an event in a simple route: You can find your project API key and…

Read next article