-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adding posthog libs for node + js #16862
feat: adding posthog libs for node + js #16862
Conversation
@abhi-slash-git is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (09/27/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (09/27/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (09/27/24)1 label was added to this PR based on Keith Williams's automation. |
@sean-brydon PR created, would like your help with the frontend setup. Thank you |
Posthog is now initializing on the frontend and saving page views. We should think when we want to call the identify function on the user - in shell was re-rendering too much. Maybe we do this upon login? |
@sean-brydon Yep you are right, we can do this on login. We also have to remember to do call reset() on logout as well. |
organization: data?.organization?.slug, | ||
sum_of_event_types: data?.sumOfEventTypes, | ||
sum_of_team_event_types: data?.sumOfTeamEventTypes, | ||
is_premium: data?.isPremium, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sean-brydon check which properties to remove
@sean-brydon bump for visibilty |
This PR is being marked as stale due to inactivity. |
E2E results are ready! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - will see if someone else can have some eyes as i did a bit of work on this also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me
Thank you for your help on this :)
useEffect(() => { | ||
if (!process.env.NEXT_PUBLIC_POSTHOG_KEY) return; | ||
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, { | ||
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://us.i.posthog.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though we use the EU PostHog region, we can keep the US one as the fallback
@abhi-slash-git could you sign the CLA real quick? You should see it as the second comment on this PR |
Building the docker container with this change applied fails for me as follows:
|
i guess changing the line to |
@abhi-slash-git i don't understand why you didn't have this issue during building |
@sean-brydon might know, I believe he added this change |
@neuhaus @abhi-slash-git @sean-brydon this is now causing issues locally. I'm getting the same errors when building locally. |
What does this PR do?
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist