All Projects → mixpanel → mixpanel-react-native

mixpanel / mixpanel-react-native

Licence: Apache-2.0 license
Official React Native Tracking Library for Mixpanel Analytics

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
swift
15916 projects
objective c
16641 projects - #2 most used programming language
python
139335 projects - #7 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to mixpanel-react-native

react-native-tracking-transparency
🕵️ A React Native Library for interacting with the tracking API from iOS 14.
Stars: ✭ 149 (+115.94%)
Mutual labels:  tracking, native
webgl-raub
WebGL bindings to desktop OpenGL
Stars: ✭ 66 (-4.35%)
Mutual labels:  native
untrace
🐳 Minimal event tracking on the client in 300 bytes.
Stars: ✭ 26 (-62.32%)
Mutual labels:  tracking
blog
📓前端博客👏 ⭐⭐⭐鼓励一下👉
Stars: ✭ 41 (-40.58%)
Mutual labels:  native
TobiiGlassesPyController
Tobii Pro Glasses 2 Python controller
Stars: ✭ 42 (-39.13%)
Mutual labels:  tracking
sdks
Polyaxon Clients & Langange SDKS
Stars: ✭ 12 (-82.61%)
Mutual labels:  tracking
status-bar-height
Listen to status bar changes during incoming calls and other multi-tasking events
Stars: ✭ 73 (+5.8%)
Mutual labels:  native
edusense
EduSense: Practical Classroom Sensing at Scale
Stars: ✭ 44 (-36.23%)
Mutual labels:  tracking
ARFaceFilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 72 (+4.35%)
Mutual labels:  tracking
trackanimation
Track Animation is a Python 2 and 3 library that provides an easy and user-adjustable way of creating visualizations from GPS data.
Stars: ✭ 74 (+7.25%)
Mutual labels:  tracking
Awesome-Vision-Transformer-Collection
Variants of Vision Transformer and its downstream tasks
Stars: ✭ 124 (+79.71%)
Mutual labels:  tracking
FMFNet
Official Pytorch implementation for the paper: "FMFNet: Improve the 3D Object Detection and Tracking via Feature Map Flow" [Accepted in IJCNN-2022]
Stars: ✭ 23 (-66.67%)
Mutual labels:  tracking
BirdsEye
Applying Perspective transformations to 2d images.
Stars: ✭ 22 (-68.12%)
Mutual labels:  tracking
native-samples
Samples of modern build automation for native languages with Gradle
Stars: ✭ 140 (+102.9%)
Mutual labels:  native
ti.coremotion
Support for the native iOS CoreMotion framework in Appcelerator Titanium
Stars: ✭ 15 (-78.26%)
Mutual labels:  native
hexen-dll-injector
HEX-EN DLL Injector
Stars: ✭ 20 (-71.01%)
Mutual labels:  native
av.imageview
Titanium native ImageView module that extends the default Titanium ImageView with more capabilities and a different caching system.
Stars: ✭ 97 (+40.58%)
Mutual labels:  native
Face-Detection-and-Tracking
Face Detection and tracking using CamShift, Kalman Filter, Optical Flow
Stars: ✭ 30 (-56.52%)
Mutual labels:  tracking
whotracks.me
Data from the largest and longest measurement of online tracking.
Stars: ✭ 288 (+317.39%)
Mutual labels:  tracking
ult
The Ultimate Dev Stack
Stars: ✭ 54 (-21.74%)
Mutual labels:  native
Mixpanel React Native Library

Table of Contents

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

Mixpanel's React Native SDK is a wrapper around Mixpanel’s native iOS and Android SDKs and it supports offline tracking. Check out our official documentation for more in depth information on installing and using Mixpanel on React Native.

1. Install Mixpanel

Prerequisites

Steps

  1. Under your app's root directory, install Mixpanel React Native SDK.
npm install mixpanel-react-native
  1. Under your application's ios folder, run
pod install

Please note: You do not need to update your Podfile to add Mixpanel.

  1. Since Xcode 12.5, there is a known swift compile issue, please refer to this workaround. However the compile issue has been resolved in Xcode 13.2.1+, there is no extra step required as long as you upgrade to Xcode 13.2.1+.

2. Initialize Mixpanel

To start tracking with the library you must first initialize with your project token. You can get your project token from project settings.

import { Mixpanel } from 'mixpanel-react-native';

const mixpanel = new Mixpanel("Your Project Token");
mixpanel.init();

Once you've called this method once, you can access mixpanel throughout the rest of your application.

3. Send Data

Let's get started by sending event data. You can send an event from anywhere in your application. Better understand user behavior by storing details that are specific to the event (properties). After initializing the library, Mixpanel will automatically track some properties by default. learn more

// Track with event-name
mixpanel.track('Sent Message');
// Track with event-name and property
mixpanel.track('Plan Selected', {'Plan': 'Premium'});

In addition to event data, you can also send user profile data. We recommend this after completing the quickstart guide.

4. Check for Success

Open up Events in Mixpanel to view incoming events. Once data hits our API, it generally takes ~60 seconds for it to be processed, stored, and queryable in your project.

Complete Code Example

import React from 'react';
import { Button, SafeAreaView } from "react-native";
import { Mixpanel } from 'mixpanel-react-native';

const mixpanel = new Mixpanel("Your Project Token");
mixpanel.init();

const SampleApp = () => {
  return (
    <SafeAreaView>
      <Button
        title="Select Premium Plan"
        onPress={() => mixpanel.track("Plan Selected", {"Plan": "Premium"})}
      />
    </SafeAreaView>
  );
}

export default SampleApp;

👋 👋 Tell us about the Mixpanel developer experience! https://www.mixpanel.com/devnps 👍 👎

FAQ

I want to stop tracking an event/event property in Mixpanel. Is that possible?
Yes, in Lexicon, you can intercept and drop incoming events or properties. Mixpanel won’t store any new data for the event or property you select to drop. See this article for more information.

I have a test user I would like to opt out of tracking. How do I do that?
Mixpanel’s client-side tracking library contains the optOutTracking() method, which will set the user’s local opt-out state to “true” and will prevent data from being sent from a user’s device. More detailed instructions can be found in the section, Opting users out of tracking.

Why aren't my events showing up?
To preserve battery life and customer bandwidth, the Mixpanel library doesn't send the events you record immediately. Instead, it sends batches to the Mixpanel servers every 60 seconds while your application is running, as well as when the application transitions to the background. You can call flush() manually if you want to force a flush at a particular moment.

mixpanel.flush();

If your events are still not showing up after 60 seconds, check if you have opted out of tracking. You can also enable Mixpanel debugging and logging, it allows you to see the debug output from the Mixpanel library. To enable it, call setLoggingEnabled with true, then run your iOS project with Xcode or android project with Android Studio. The logs should be available in the console.

mixpanel.setLoggingEnabled(true);

Starting with iOS 14.5, do I need to request the user’s permission through the AppTrackingTransparency framework to use Mixpanel?
No, Mixpanel does not use IDFA so it does not require user permission through the AppTrackingTransparency(ATT) framework.

If I use Mixpanel, how do I answer app privacy questions for the App Store?
Please refer to our Apple App Developer Privacy Guidance

I want to know more!

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].