How to disable Segment tracking during development in expo client?

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?

1 Like

Hey @heiki,

I just pinged about this internally. I’ll let you know what I find out.

Cheers,
Adam

1 Like

Thanks for the quick reply! It’s not urgent - more like a nice-to-have.

1 Like

Any update on this one?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.