Closed
Description
- analytics-react-native version: 2.20.4
- Integrations versions (if used): @segment/sovran-react-native: 1.1.3
- React Native version: 0.76.7
- iOS or Android or both? both
Steps to reproduce
Create a config:
const segmentClient = createClient({
writeKey: SEGMENT_ANALYTICS_KEY,
trackAppLifecycleEvents: true,
});
When sending a batch the url visited returns a 404:
Expected behavior
Url should be valid
Actual behavior
Segment returns a 404
Workaround
I have found a workaround is to use a proxy and disable segment endpoints. This fixes the batch issue, but it may introduce others.
const segmentClient = createClient({
writeKey: envConfig.env.SEGMENT_WRITE_KEY,
trackAppLifecycleEvents: true,
useSegmentEndpoints: false,
proxy: 'https://api.segment.io/v1/batch',
});