Install Posthog snippet (#573)

* Install Posthog snippet

* Switch to using posthog-docusaurus plugin

---------

Co-authored-by: hiento09 <136591877+hiento09@users.noreply.github.com>
Co-authored-by: Service Account <service@jan.ai>
This commit is contained in:
Ashley 2023-11-13 17:01:35 +07:00 committed by GitHub
parent bff2588ecc
commit a1eaa93645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View File

@ -1 +1,3 @@
GTM_ID=xxxx
GTM_ID=xxxx
POSTHOG_PROJECT_API_KEY=xxxx
POSTHOG_APP_URL=xxxx

View File

@ -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

View File

@ -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",

View File

@ -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"