Skip to content
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

Web posthog #1294

Merged
merged 2 commits into from
Jul 9, 2024
Merged

Web posthog #1294

merged 2 commits into from
Jul 9, 2024

Conversation

GuillaumeDSM
Copy link
Member

No description provided.

@GuillaumeDSM GuillaumeDSM requested a review from Herklos July 8, 2024 23:36
@GuillaumeDSM GuillaumeDSM self-assigned this Jul 8, 2024
const resetIfNecessary = () => {
if (getUserEmail() === ""){
// no logged in user and just logged out
// TODO: figure out when user just logged out
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a TODO: we don't want to all reset() everytime there is no email => how to know the user just logged out

@GuillaumeDSM GuillaumeDSM changed the title Web Web posthog Jul 8, 2024
const identify = (email) => {
posthog.identify(
'distinct_id', // Replace 'distinct_id' with your user's unique identifier
{ email: 'max@hedgehogmail.com', name: 'Max Hedgehog' } // optional: set additional person properties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ email: 'max@hedgehogmail.com', name: 'Max Hedgehog' } // optional: set additional person properties
{ email: email }

@GuillaumeDSM GuillaumeDSM merged commit b568d56 into dev Jul 9, 2024
5 checks passed
@GuillaumeDSM GuillaumeDSM deleted the web branch July 9, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants