fix: update session recordings for posthog (#9775)

<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved

- Updates to only capture 10% of events with posthog

# How the Problems Are Solved

- Uses a feature flag rolled out to 10% of users to enable the capture

# Additional Changes

N/A

# Additional Context

N/A
This commit is contained in:
David Skewis
2025-04-29 10:42:49 +01:00
committed by GitHub
parent ed4e226da9
commit ce823c9176

View File

@@ -26,8 +26,16 @@ export class PosthogService implements OnDestroy {
maskAllInputs: true,
maskTextSelector: '*',
},
disable_session_recording: true,
enable_heatmaps: true,
persistence: 'memory',
loaded: (posthog) => {
posthog.onFeatureFlags((flags) => {
if (posthog.isFeatureEnabled('session_recording')) {
posthog.startSessionRecording();
}
});
},
});
}
}