-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: track anonymous personfull events in usage reports #23461
feat: track anonymous personfull events in usage reports #23461
Conversation
WHERE timestamp between %(begin)s AND %(end)s | ||
AND event != '$feature_flag_called' AND event NOT IN ('survey sent', 'survey shown', 'survey dismissed') | ||
AND person_mode IN ('full', 'force_upgrade') | ||
AND JSONExtractBool(properties, '$is_identified') = 0 |
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.
@robbie-c what if someone had used $set
to add person properties - would they be considered identified from posthog.js?
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.
Just added two questions
@@ -224,11 +224,12 @@ def bulk_create_events( | |||
|
|||
except Group.DoesNotExist: | |||
continue | |||
properties = event.get("properties", {}) |
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.
This doesn't seems like it didn't anything.
posthog/tasks/usage_report.py
Outdated
@@ -74,6 +74,7 @@ class UsageReportCounters: | |||
event_count_in_period: int | |||
enhanced_persons_event_count_in_period: int | |||
event_count_with_groups_in_period: int | |||
anonymous_personfull_event_count_in_period: int |
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.
Nit: shouldn't this have one l? "personful"
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.
We've used "personfull" in internal communications but I think it's a britishism, so yes changing to personful
😄
Problem
We want to see how many of our events per customer are anonymous but personfull to see if we can make the anonymous events all personless.
Changes
In usage reports, adds a metric for anonymous personfull events.
I will re-run usage reports for the last few days so this metric shows up and we can run numbers from there.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?
Updated the tests, which annoyingly took forever, I think there are too many ways to do the same thing, or they're named poorly or something.