This repository was archived by the owner on Jun 25, 2025. It is now read-only.
SUPPORT SUPERDAY: Lolu#46
Open
jesuloluwao wants to merge 1 commit into
Open
Conversation
Author
|
@abigailbramble Please review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Customer.io PostHog plugin currently only sends events when the current event payload contains an email. If a user provides their email in one event but omits it in subsequent events, those later events are dropped or attributed to a separate profile by
distinct_id, causing fragmented customer data in Customer.io.Changes
customer-email/<distinct_id>.syncCustomerMetadata, capture and validate emails from$set.emailand store them; if an event lacks an email, retrieve the stored email.exportSingleEvent, only skip sending if no email is ever known. Otherwise, use the stored (or current) email as the Customer.io identifier.shouldCustomerBeTrackedto rely on the actual presence of an email rather than just a status flag.Did you write or update any docs for this change?
How did you test this code?
distinct_id = "user123":$set.email = "user@acme.com"): plugin stores email and sends identify/track calls using"user@acme.com"."user@acme.com"and successfully tracks the event under the same profile.$set.email = "new@acme.com"): plugin validates, updates storage, and all following events use"new@acme.com".$set.email) appear under one Customer.io profile.