Skip to content

Commit

Permalink
Install Posthog snippet (janhq#573)
Browse files Browse the repository at this point in the history
* Install Posthog snippet

* Switch to using posthog-docusaurus plugin

---------

Co-authored-by: hiento09 <[email protected]>
Co-authored-by: Service Account <[email protected]>
  • Loading branch information
3 people authored Nov 13, 2023
1 parent bff2588 commit a1eaa93
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
GTM_ID=xxxx
GTM_ID=xxxx
POSTHOG_PROJECT_API_KEY=xxxx
POSTHOG_APP_URL=xxxx
8 changes: 8 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ const config = {
},
};
},
[
"posthog-docusaurus",
{
apiKey: process.env.POSTHOG_PROJECT_API_KEY,
appUrl: process.env.POSTHOG_APP_URL, // optional
enableInDevelopment: false, // optional
},
],
],

// Only for react live
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"docusaurus-plugin-sass": "^0.2.5",
"js-yaml": "^4.1.0",
"postcss": "^8.4.30",
"posthog-docusaurus": "^2.0.0",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
5 changes: 5 additions & 0 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8975,6 +8975,11 @@ postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.17, postcss@^8.4.21, postcss@^8.4
picocolors "^1.0.0"
source-map-js "^1.0.2"

posthog-docusaurus@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/posthog-docusaurus/-/posthog-docusaurus-2.0.0.tgz#8b8ac890a2d780c8097a1a9766a3d24d2a1f1177"
integrity sha512-nDSTIhmH/Fexv347Gx6wBCE97Z+fZTj0p/gqVYAaolMwSdVuzwyFWcFA+aW9uzA5Y5hjzRwwKJJOrIv8smkYkA==

prepend-http@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
Expand Down

0 comments on commit a1eaa93

Please sign in to comment.