If you want to set up analytics on React Native for iOS? Since it is a pretty simple native bridge to the official Google Analytics libraries, it should not give you any issues related to the platform. Also, it will handle a lot of the metadata automatically, like the device UUID, device model, viewport size, OS version etc.
Because of that last part, the calls can be pretty simple, like tracking a new screen view:
1 2 3 | import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge'; let tracker = new GoogleAnalyticsTracker('UA-12345-1'); tracker.trackScreenView('Home') |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.