Skip to content

Commit

Permalink
Relax upgrading on setPersonPropertiesForFlags and setGroupProperties…
Browse files Browse the repository at this point in the history
…ForFlags
  • Loading branch information
robbie-c committed Apr 19, 2024
1 parent 7cd4cac commit 5f3fb30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/posthog-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 5f3fb30

Please sign in to comment.