-
-
Notifications
You must be signed in to change notification settings - Fork 18
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(analytics): track metrics for apps and groups as for users #2627
Conversation
e074a40
to
3273c58
Compare
platform/authorization/src/jsonrpc/methods/revokeAppAuthorization.ts
Outdated
Show resolved
Hide resolved
platform/identity/src/jsonrpc/methods/identity-groups/createIdentityGroup.ts
Outdated
Show resolved
Hide resolved
distinctId: ctx.identityURN as IdentityURN, | ||
eventName: input.published ? 'user_published_app' : 'user_unpublished_app', | ||
apiKey: ctx.POSTHOG_API_KEY, | ||
properties: { $groups: { app: input.clientId } }, |
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.
example of where we need to add gropu id later
apiKey: ctx.POSTHOG_API_KEY, | ||
distinctId: identityURN, | ||
properties: { | ||
$groups: { app: clientId }, |
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.
can we add plan type or sometning here, do we have it?
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.
Here is where we update property of the app. I set plan as a property of the app - this way it's easier to filter apps on paid and free ones.
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.
Right now the only way to change group is through calling $groupidentify
event. This event is called when I need to identify a group to show it under Persons & Groups tab
and also to set its properties (in fact something must be in properties for the group to show up).
|
||
// This is the way how we can update group properties | ||
// https://posthog.com/tutorials/frontend-vs-backend-group-analytics | ||
await createAnalyticsEvent({ |
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.
what is the different between these two types of events?
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.
Per our convo in discord, it sets app properties to the group.
Description
Creates tracking for groups' and apps' events for future metrics.
Related Issues
Testing
All events were tested locally.
Checklist