-
Notifications
You must be signed in to change notification settings - Fork 60
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
PostHog events & groups first pass #1922
Conversation
Other events I think we still want to capture here for pipeline/funnel analysis:
Features/events we cannot easily hook into are related to the Team Library, as that management is done via the Node-RED tooling. Similarly, any snapshots created via the NR Tools plugin, would also not get picked up. billing-specific events too would be handy, but not 100% where to tag these in, specifically where we can rely on these from the Stripe callbacks:
We do get the billing state from a team already though. Which will persists the |
* @param {Object} proeprties - a JSON object defining features for this group, all can be overriden | ||
*/ | ||
function groupUpdate (type, id, properties) { | ||
capture('$groupidentify', { |
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.
for context on this: PostHog/posthog-js#600
currently, in the client-side JS library, we cannot call just a groupIdentify
, the client JS group()
function currently sets a session variable such that all future events are bound to that group, which we do not want. In speaking with the dev team at PostHog (see the linked Slack thread) they informed me that I can just do this instead.
@joepavitt And I went over this PR on Friday. I'm happy for this to move forward. |
@Pezmc fyi - got a couple of little extras to add in given the Trial effectiveness analysis I was doing end of last week |
@MarianRaphael this is good to go and has sign off code-side, but want your eyes on the list above too to make sure no obvious ones missed. RE: the project suspended, started, I'll be putting those in now |
# Conflicts: # frontend/src/pages/instance/index.vue
…stance list refresh
Description
product.js
service added to provide a centralised resource for calling PostHog. Also handles the case where no PostHog is configured or existsIdentify:
ff-cloud-user: true
andff-cloud-joined: <utc-timestamp>
against the Person object, as currently we rely onemail
andusername
existing to infer this, which is reliable, but may not be guaranteed.Events Added:
$ff-application-created
$ff-application-deleted
$ff-instance-created
$ff-instance-deleted
$ff-device-created
$ff-device-deleted
$ff-snapshot-created
$ff-snapshot-deleted
$ff-team-created
$ff-team-deleted
$ff-invite-sent
$ff-invite-removed
$ff-invite-accepted
$ff-invite-rejected
$ff-user-registered
Group Calls:
team
group is identified whenever thegetTeam
function is called, this then updates the PH group with number of instances, applications members, etc.application
group is called upon instance creation, and currently only updated on deletioninstance
group is called upon instance creation, and currently only updated on deletiondevice
group is called upon instance creation, and currently only updated on deletionI have opted to architect this such that additional fields are required to pass to the services, e.g. team/application ids, then all of the PH logic is centralised to the services, rather than needing to be built on each page the functions/services are used.
Related Issue(s)
Closes #1904
Checklist