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

fix(lifecycle): filter out personless events from lifecycle insights #27118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thmsobrmlr
Copy link
Contributor

@thmsobrmlr thmsobrmlr commented Dec 20, 2024

Problem

Anonymous persons show up as resurrecting in lifecycle insights. This is because we look at the persons’ created at (events.person.created_at) to determine wether they are new or resurrecting. Since anonymous persons don't have a person profile, this property is null which then looks like the person has been there since the beginning of (unix) time.

Closes: #25367

Changes

This PR filter out personless events in the lifecycle insight.

An alternative approach would be to look at the first event associated with each person_id for anonymous users. However, I don’t see a performant way to achieve this without creating some form of a person profile. For thoroughness, I attempted to join an events query without date limits, but this exceeded the memory limit for our team.

tbd: how do we signal to users that this insight excludes anonymous events, while e.g. retention has them? just docs?

How did you test this code?

Added a test and manual testing

before:
Screenshot 2024-12-20 at 19 20 41

after:
Screenshot 2024-12-20 at 19 21 52

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.

Bug: Personless events in lifecycle insights appear as resurrected
1 participant