betaacid / expo-analytics

Google Analytics integration for use with React Native apps built on Expo
MIT License
288 stars 63 forks source link

Added platform check to no-cors mode #66

Closed spencerlevitt closed 4 years ago

spencerlevitt commented 4 years ago

Added the options logic to lines 137-154 so that, when on web, the mode is set to "no-cors" to fix a preflight response error with the google analytics fetch call. I tested this fix with both mobile and web to double-check and ensure it works

ryanvanderpol commented 4 years ago

@spencerlevitt thanks for this. I hate to nitpick, but can you reverse all the formatting changes so I can actually see what you changed? It looks like you changed the entire file.

spencerlevitt commented 4 years ago

Sorry about that @ryanvanderpol - it must have been my VS code formatter.