When using checkGateWithExposureLoggingDisabled
at launch, it will not log an exposure event. This is particularly useful when you don't want to log exposures for users who may not reach the feature you're testing.
Later, when the user reaches the feature, calling checkGate
will indeed log an exposure event. This is because checkGate
by default logs an exposure event when it is called. Therefore, you do not need to call manuallyLogGateExposure
in this case.
However, it's important to be aware that manually logging exposures can lead to an imbalance in exposure events if not done correctly. For example, only triggering exposures for users in the Test group of an experiment could imbalance the experiment.
Both checkGate
and checkGateWithExposureLoggingDisabled
will return the same result for a given user & gate. The thing to watch out for is if there are any changes between checkGateWithExposureLoggingDisabled
and checkGate
(e.g. gate is updated or user is updated).