If you want control over which sessions to record:
- Set - disable_session_recording: truein your config.
- Manually start recording by calling - posthog.startSessionRecording(). Similarly, you can stop the recording at any point by calling- posthog.stopSessionRecording().
You can then achieve even finer control by combining the above methods with feature flags. This enables you to control session recordings based on user or group properties. You can also use feature flags to capture a percentage of all sessions.
For example:
For more examples of controlling which sessions you record, see our tutorial on how to only record the sessions you want.