Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
mixpanel-react-native
Advanced tools
Welcome to the official Mixpanel React Native library. The Mixpanel React Native library is an open-source project, and we'd love to see your contributions! We'd also love for you to come and work with us! Check out Jobs for details
Check out our official documentation for more in depth information on installing and using Mixpanel on React Native.
npm install mixpanel-react-native
pod install
At this point, you are ready to use Mixpanel React Native SDKTo start tracking with the library you must first initialize with your project token. To initialize the library, first add import { Mixpanel }
and call Mixpanel.init(token)
with your project token as it's argument.
import { Mixpanel } from 'mixpanel-react-native';
...
class YourClass extends React.Component {
constructor(props) {
super(props);
this.configMixpanel();
}
configMixpanel = async () => {
this.mixpanel = await Mixpanel.init("Your mixpanel token");
}
...
Once you've called this method once, you can access mixpanel
throughout the rest of your application.
Once you've initialized the library, Mixpanel will automatically collect common mobile events. You can enable/ disable automatic collection through your project settings.
With the mixpanel
object created in the last step a call to track
is all you need to send additional events to Mixpanel.
// Track with event-name
mixpanel.track('Sent Message');
// Track with event-name and property
mixpanel.track('Plan Selected', {'Plan': 'Premium'});;
You're done! You've successfully integrated the Mixpanel React Native SDK into your app. To stay up to speed on important SDK releases and updates, star or watch our repository on Github.
No worries, here are some links that you will find useful:
Have any questions? Reach out to Mixpanel Support to speak to someone smart, quickly.
FAQs
Official React Native Tracking Library for Mixpanel Analytics
The npm package mixpanel-react-native receives a total of 45,225 weekly downloads. As such, mixpanel-react-native popularity was classified as popular.
We found that mixpanel-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.