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

[FEATURE]Add distinct_id to group_identify #155

Merged
merged 4 commits into from
Jan 3, 2025
Merged

Conversation

sibinms
Copy link
Contributor

@sibinms sibinms commented Jan 2, 2025

Feature

  • Add distinct_id to group_identify #137
  • This PR adds the capability of passing distinct_id to the group_identify() function in the PostHog Client
  • This allows the users to tag a group identify event to a person ID

Before
Screenshot 2025-01-01 at 5 18 34 PM

After

Screenshot 2025-01-02 at 8 41 14 AM

Sample code :

group_type = "business"
group_key = 2668  # business_id
distinct_id=2675  # user_id
ph_client = posthog.Client(api_key=POSTHOG_API_KEY)
ph_client.group_identify(group_type, group_key, properties, distinct_id=distinct_id)

@sibinms sibinms marked this pull request as draft January 2, 2025 03:15
@dmarticus dmarticus marked this pull request as ready for review January 2, 2025 04:35
Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

Great work @sibinms! Can you please make the following changes so that this change is released immediately?

  • update version.py to use 3.7.5 instead of 3.7.4
  • add an entry to CHANGELOG.md for this version

Once that's done, I'll merge this and then run the workflow to deploy it to PyPi. Thanks for your contribution!

@dmarticus
Copy link
Contributor

I fixed CI in master, so this is safe to merge and deploy. thanks again for the contribution!

@dmarticus dmarticus merged commit 05932b3 into PostHog:master Jan 3, 2025
1 of 2 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.

2 participants