Skip to content

Commit

Permalink
initialize posthog analytics
Browse files Browse the repository at this point in the history
Signed-off-by: Sudhanshu Dasgupta <[email protected]>
  • Loading branch information
sudhanshutech committed Sep 19, 2024
1 parent efe98fa commit b90d4c8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "./fonts.css";
import posthog from "posthog-js";

document.addEventListener("DOMContentLoaded", () => {
/** init gtm after 3500 seconds - this could be adjusted */
Expand Down Expand Up @@ -28,5 +29,12 @@ function initGTM() {
document.head.appendChild(script);
}

posthog.init("phc_Yynjz2lAiQDJFqTWeGT0FJrt50hl53WBx8do3eKImgX",
{
api_host: "https://us.i.posthog.com",
person_profiles: "always",
}
);

export { wrapRootElement } from "./root-wrapper";
export { wrapPageElement } from "./page-wrapper";
30 changes: 30 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"lodash": "^4.17.21",
"mui-datatables": "^4.3.0",
"path-browserify": "^1.0.1",
"posthog-js": "^1.161.6",
"prism-react-renderer": "^1.3.5",
"process": "^0.11.10",
"prop-types": "^15.7.2",
Expand Down

0 comments on commit b90d4c8

Please sign in to comment.