diff --git a/gatsby-browser.js b/gatsby-browser.js index d376274137d2..b8de40d7000f 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -35,6 +35,9 @@ export const onClientEntry = () => { { api_host: "https://us.i.posthog.com", person_profiles: "always", + autocapture: { + url_ignorelist: ["community/newcomers", "/calendar", "/newcomers"] + } } ); } diff --git a/src/sections/General/Navigation/index.js b/src/sections/General/Navigation/index.js index 66333ffcba09..31f0f6a193b3 100644 --- a/src/sections/General/Navigation/index.js +++ b/src/sections/General/Navigation/index.js @@ -21,6 +21,7 @@ import CloudIcon from "./utility/CloudIcon.js"; import LogoutIcon from "./utility/LogoutIcon.js"; // import LogoutIcon from "./utility/LogoutIcon.js"; import KanvasIcon from "./utility/KanvasIcon.js"; +import posthog from "posthog-js"; const Navigation = () => { let data = useStaticQuery( graphql` @@ -212,6 +213,14 @@ const Navigation = () => { } const data = response.data; + if (data){ + posthog.identify( + data?.id, + { + email: data?.email + } + ); + } setUserData(data); } catch (error) { console.error("There was a problem with your fetch operation:", error);