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

[Analytics] Fix user IDs in Posthog #1372

Closed
mplorentz opened this issue Aug 2, 2024 · 3 comments
Closed

[Analytics] Fix user IDs in Posthog #1372

mplorentz opened this issue Aug 2, 2024 · 3 comments
Assignees

Comments

@mplorentz
Copy link
Member

mplorentz commented Aug 2, 2024

When Posthog lists users it displays some with a NIP-05, some with an npub, and some with a UUID. Most of the users with a UUID also have an npub set, and we want Posthog to display that.

I think we need to submit the npub as a property when we call Analytics.identify in the app, and then add the npub to the list of properties used for "Person Display Name" in the PostHog settings.

@mplorentz mplorentz changed the title Fix user IDs in Posthog [Analytics] Fix user IDs in Posthog Aug 2, 2024
@martindsq
Copy link
Member

I set npub as the preferred property after NIP-05 for displaying person names in PostHog.

You can have an example here https://us.posthog.com/project/56924/person/0191571B-2964-7D9B-BF48-8E7A6C08BE9C of a user with both npub and NIP-05 set.

@setch-l
Copy link

setch-l commented Aug 26, 2024

@martindsq @mplorentz - Admittedly I'm a bit unclear on what the expected outcome should be of this ticket.

These are the steps I used to test it.

  1. Open Posthog
  2. Navigate to a dashboard
  3. Click on a day
  4. Click on the users for the day
    Expected that list should be populated by Npubs
    Issue: It is still populated by a mix of posthog ids, npubs and NIP05s

Image

When I copied a posthog ID and searched for it in the people search, it yielded this result:

https://us.posthog.com/project/56924/person/0191888F-49C2-7551-86FF-69563B95129E#activeTab=properties

Which still does not have either the NPub or the Nip05.

@mplorentz
Copy link
Member Author

@setch-l it looks like this hasn't been deployed to production yet. We won't start seeing npubs replace the UUIDs until the build is in production and folks launch the app so it can report their npub to PostHog.

Although you can do some testing with a staging or production build. Just generate a fresh account, don't set an NIP-05, and then search for them in https://us.posthog.com/project/56924/persons and their npub should show up as the primary identifier, not the ugly UUID.

@setch-l setch-l closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants