Repository navigation
feat(analytics): add setPersonProperties to the facade - #83
Merged
Merged
Conversation
Person properties are not super properties and neither substitutes for the other: a super property belongs to the event and says what was true when it fired, which is what a funnel reads, while only a person property lets a vendor filter and cohort PEOPLE — which retention-by-plan and "free users who hit a wall three times" need. The sink method takes `once` separately so a vendor can honour $set_once. plan_key_first and became_paid_at must survive every later upgrade; a plain set would overwrite them each time and the cohort would shift underneath. Sinks with no notion of a person (Branch, Meta, Firebase) simply do not implement it, so a caller never has to know which vendors can take it. Depends on idivarts/shared-constants#11 for the two new types. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Oct 28, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part 2 of 5. Depends on idivarts/shared-constants#11 (the two new types) — merge that first.
What
One optional sink method and one exported function:
Why it is separate from
setContextThe two answer different questions and neither substitutes for the other:
setContext) belong to the event — "what plan was this event fired on". That is what a funnel reads.Why
onceis a separate argumentplan_key_first,became_paid_atandfirst_brand_namemust survive every later change. A plain set would overwrite them on each upgrade and the acquisition cohort would shift underneath you. The interface doc tells a vendor without that distinction to writepropsand ignoreonce, rather than silently overwriting a first-ever value.Coverage
Sinks with no notion of a person (Branch, Meta, Firebase) simply do not implement the method, so a caller never needs to know which vendors can take it. The PostHog sinks implement it in
trendly-brands(PR 4 of 5) — web viaposthog.setPersonProperties, native via a$setcapture, sinceposthog-react-nativehas no equivalent API andidentify()with properties can only$set.🤖 Generated with Claude Code