PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.39k stars 1.13k forks source link

Discourage use of $initial props for flag targeting #23356

Open neilkakkar opened 4 days ago

neilkakkar commented 4 days ago

Feature request

Is your feature request related to a problem?

When people select $initial_X as a property for flag targeting, they run into unexpected problems because all automated client-side handling we do doesn't apply to initial props (they always need to be reconciled on the server), which causes flag to unexpectedly return false.

IN most cases, users want the latest property, rather than the initial one, which works seamlessly.

Please describe.

Describe the solution you'd like

Discourage / warn users to not use initial props

Describe alternatives you've considered

Additional context

Lots of tickets, see https://posthoghelp.zendesk.com/agent/tickets/15028 and the linked thread.

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]