Reading from documentation and looking at my user analytics I can see that Segment tracks events also in the Expo app. I tried to disable the tracking using a simple environment check:
if (Constants.appOwnership !== sharedConstants.STANDALONE_APP) {
console.log("disable")
Segment.setEnabledAsync(false); // disable tracking for expo environment
}
but it fails with Error: Setting Segment’s enabled
is not supported in Expo Client.
Thus the question: how to avoid Segment sending any tracking info when the app is being used in the expo client?