Analytics
In this app, We have used Segment Analytics, one of the leading platform in performing in-app analytics using events and screen triggers.
Architecture
We have created a helper (app/@arivaa-react-native/helpers/analytics.js) for you to manage to manage the analytics flow.
Configuration is done under app/constants/environment.js and app/constants/setup.js . (You will need to change the API Key here).
Guide
- Create an account on segment portal.
- Create 2 sources for ios and android.
- Go to each source and then to settings/API Keys and copy the write key for ios and android.
- Update the api keys inapp/constants/environment.js
- You can start firing events in the application using trackEvent and recordScreenTransition methods present in src/config/analytics.js.
- View the events and screen transitions in the debugger.
- Optional - In order to route these analytics to destinations like google analytics, you can create and configure destinations also in segment portal. No setup required on application end.