From 5f3fb3016c66fa861ed181b1a5f3a16265c15d53 Mon Sep 17 00:00:00 2001 From: Robbie Date: Fri, 19 Apr 2024 17:15:16 +0100 Subject: [PATCH] Relax upgrading on setPersonPropertiesForFlags and setGroupPropertiesForFlags --- src/posthog-core.ts | 6 ------ src/types.ts | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/posthog-core.ts b/src/posthog-core.ts index cde3fde37..2a2021c93 100644 --- a/src/posthog-core.ts +++ b/src/posthog-core.ts @@ -1373,9 +1373,6 @@ export class PostHog { * to update user properties. */ setPersonPropertiesForFlags(properties: Properties, reloadFeatureFlags = true): void { - if (!this._requirePersonProcessing('posthog.setPersonPropertiesForFlags')) { - return - } this.featureFlags.setPersonPropertiesForFlags(properties, reloadFeatureFlags) } @@ -1392,9 +1389,6 @@ export class PostHog { * setGroupPropertiesForFlags({'organization': { name: 'CYZ', employees: '11' } }) */ setGroupPropertiesForFlags(properties: { [type: string]: Properties }, reloadFeatureFlags = true): void { - if (!this._requirePersonProcessing('posthog.setGroupPropertiesForFlags')) { - return - } this.featureFlags.setGroupPropertiesForFlags(properties, reloadFeatureFlags) } diff --git a/src/types.ts b/src/types.ts index 05c2226f9..92096dbdc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -152,8 +152,8 @@ export interface PostHogConfig { /** You can control whether events from PostHog-js have person processing enabled with the `person_profiles` config setting. There are three options: * - `person_profiles: 'always'` _(default)_ - we will process persons data for all events + * - `person_profiles: 'identified_only'` - we will only process persons when you call `posthog.identify`, `posthog.alias`, `posthog.setPersonProperties`, `posthog.group`. Anonymous users won't get person profiles. * - `person_profiles: 'never'` - we won't process persons for any event. This means that anonymous users will not be merged once they sign up or login, so you lose the ability to create funnels that track users from anonymous to identified. All events (including `$identify`) will be sent with `$process_person_profile: False`. - * - `person_profiles: 'identified_only'` - we will only process persons when you call `posthog.identify`, `posthog.alias`, `posthog.setPersonProperties`, `posthog.group`, `posthog.setPersonPropertiesForFlags` or `posthog.setGroupPropertiesForFlags` Anonymous users won't get person profiles. */ person_profiles?: 'always' | 'never' | 'identified_only' /** @deprecated - use `person_profiles` instead */