Skip to content

Conversation

@KopeikinaDarya
Copy link
Contributor

the same problem wowrumal/posthog-ios#3

My change addresses the behavior of sticky feature flags from this PostHog tutorial. When initially reading and assigning feature flags to a user, I want to avoid sending the $feature_flag_called event, since these evaluations are not real exposures yet.
If I filter out these events using the beforeSend block, I lose all analytics related to feature flag exposures—including the ones I actually want to track. This approach also breaks experiment accuracy, because I can no longer trigger exposure events exactly when needed.
My update ensures that exposure events are sent only at the appropriate time, keeping experiment tracking reliable and analytics data clean.

@KopeikinaDarya KopeikinaDarya requested a review from a team as a code owner November 20, 2025 14:26
@KopeikinaDarya
Copy link
Contributor Author

will be more comments? @marandaneto @ioannisj

Copy link
Collaborator

@ioannisj ioannisj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG to me but I'll let @marandaneto have a final look

@marandaneto
Copy link
Member

@KopeikinaDarya can you fix formatting and add a unit test for this? otherwise all good, thanks!

@marandaneto
Copy link
Member

@KopeikinaDarya please run make format and add a new changelog entry

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.

3 participants