2.0.0 • Published 2 years ago
posthog-docusaurus v2.0.0
PostHog plugin for Docusaurus v2
Please see the main PostHog docs.
Specifically, the Docusaurus v2 integration details.
Installing the plugin
npm install posthog-docusaurus --save
or
yarn add posthog-docusaurus
Configuring the plugin
// docusaurus.config.js
module.exports = {
plugins: [
[
"posthog-docusaurus",
{
apiKey: "YOURAPIKEY",
appUrl: "https://app.posthog.com", // optional
enableInDevelopment: false, // optional
// other options are passed to posthog-js init as is
},
],
],
};
Using the plugin
That's it! You're ready to go!