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

add isIdentified property and check on identify() #167

Merged
merged 8 commits into from
Aug 29, 2024

Conversation

beradeep
Copy link
Contributor

@beradeep beradeep commented Aug 27, 2024

💡 Motivation and Context

This change adds the is_identified property (absent earlier) to check user is identified or not (anonymous). This change also adds a fix to identify() to ensure that an "identify" event is captured if and only if the user isn't already identified (anonymous). Also adds an in-memory flag to check if the property is already loaded or not.

fix #136 & #108

💚 How did you test it?

  • Added unit test to assert against duplicate "identify" captures
  • Added unit test to assert "identify" works as usual on reset
  • Verified that this change doesn't break existing tests

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto
Copy link
Member

Thanks @beradeep
I left a few comments, after addressing, we can merge it
don't forget to add an entry to the changelog.

@marandaneto
Copy link
Member

The flag $is_identified isn't being set though, so this issue can't be closed #136

@marandaneto
Copy link
Member

The flag $is_identified isn't being set though, so this issue can't be closed #136

i pushed 2 commits to fix this

@marandaneto marandaneto merged commit 341bedf into PostHog:main Aug 29, 2024
4 checks passed
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.

Add $is_identified
2 participants