Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mixpanel-react-native

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics

  • 1.0.0-beta.7
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source
Mixpanel React Native Library

Latest Version

Table of Contents

  • Introduction
  • Quick Start Guide
  • I want to know more!

Introduction

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

Quick Start Guide

Check out our official documentation for more in depth information on installing and using Mixpanel on React Native.

Installation

Prerequisite

Steps

  1. Install Mixpanel React Native SDK npm install mixpanel-react-native
  2. Under your application's iOS folder, run pod install At this point, you are ready to use Mixpanel React Native SDK

Integration

Initialization

To 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. Once you've called this method once, you can access instance throughout application.

import Mixpanel from 'mixpanel-react-native';
...
class YourClass extends React.Component {
    constructor(props) {
        super(props);
        this.configMixpanel();
    }

    configMixpanel = async () => {
        this.mixpanel = await Mixpanel.init(MixpanelToken);
    }
...

Tracking

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('TrackEvent');
// Track with event-name and property
mixpanel.track('TrackEvent', {'Status': 'Pending'});

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.

I want to know more!

No worries, here are some links that you will find useful:

Have any questions? Reach out to support@mixpanel.com to speak to someone smart, quickly.

Keywords

FAQs

Package last updated on 08 Dec 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc