rn-redux-mixpanel icon indicating copy to clipboard operation
rn-redux-mixpanel copied to clipboard

Automatically detect information from Device

Open ranyefet opened this issue 9 years ago • 6 comments

Hi,

Thanks for the great middleware, already using it in development! I've noticed the events I'm sending missing properties that are available when using iOS API. https://mixpanel.com/help/questions/articles/what-properties-do-mixpanels-libraries-store-by-default

Things like: App Release ($app_release) - General build of this app. App Version ($app_version) - Full detail of this app build. Carrier ($carrier) - Wireless carrier of the device owner. iOS Ifa ($ios_ifa) - iOS identifier (IDFA or IDFV, depending on which is available to the app). iOS Version ($os_version) - Current version of iOS on the device. Manufacturer ($manufacturer) - Always Apple (so far...). Lib Version ($lib_version) - Mixpanel library used to send this data. Model ($model) - Device model ID, in format "iPad 3,4". Full list here. Operating System ($os) - "iPhone OS" (outdated naming convention). Screen Height ($screen_height) - Height, in pixels, of the device screen. Screen Width ($screen_width) - Width, in pixels, of the device screen. Wifi ($wifi) - Set to true if Wifi is connected, false if not.

How hard is to integrate it into this middleware?

ranyefet avatar Nov 09 '15 12:11 ranyefet

@ranyefet We'll need to get some of that info (OS version, device model, etc.) from native contexts (iOS, Android) outside of JS itself, which would require a little building, or integration with a different RN module that provides that info.

I'll look deeper into it later this week when I'm back from vacation. I'll check in daily until then, so feel free to submit a PR:)

danscan avatar Nov 09 '15 13:11 danscan

@danscan How about using react-native-mixpanel as dependency? Btw, why are you using superagent instead of built in fetch?

ranyefet avatar Dec 03 '15 23:12 ranyefet

@ranyefet @danscan Some of the stuff you're looking for should be available in react-native-device-info for React Native at least. So only need to make those properties available for people who are using this with React Native

gudmundurmar avatar Jan 21 '16 13:01 gudmundurmar

@ranyefet fetch is not built it. IE and Safari require polyfills to use it http://caniuse.com/#feat=fetch. Better to use XMLHttpRequest since it's only used once.

cgarvis avatar Feb 23 '16 21:02 cgarvis

@cgarvis fetch is built-in react-native environment and as I understand this module is for react-native. https://facebook.github.io/react-native/docs/network.html#content

ranyefet avatar Feb 28 '16 16:02 ranyefet

@ranyefet this project was original redux-mixpanel if I'm not mistaken. No reason this can't support both environments. We could using fetch in browsers that support it and use XMLHttpRequest for those that don't. Since RN has fetch, it should "just work".

cgarvis avatar Feb 28 '16 19:02 cgarvis