This folder contains 3 sample applications demonstrating how you can use Mixpanel in your React Native app.
- SimpleMixpanel: Integrate Mixpanel with a minimalist approach
- MixpanelDemo: A full Mixpanel API demo app
- ContextAPIMixpanel: Integrate Mixpanel with Context API
- React Native v0.6+
- Prerequiste You need to set up the React Native development environment, follow the React Native CLI Quickstart section
https://reactnative.dev/docs/environment-setup
- Under the sample app's root directory, run
yarn install
- Under the sample app's ios directory, run
pod install
- To run the app in iOS, run
yarn ios
- To run the app Android, run
yarn android
There is "token" value in app.json that you'll need to update before you can send data to Mixpanel.
- Log in to your account at https://www.mixpanel.com
- Select the project you'll be working with
- Click the gear link at the top right to show the project settings dialog
- Copy the "Token" string from the dialog
Change the value of "token" in app.json to the value you copied from the web page.
The Mixpanel React Native integration API documentation is available on the Mixpanel website.