brave/mixpanel-android

Name: mixpanel-android

Owner: Brave Software

Description: null

Created: 2017-09-04 10:44:56.0

Updated: 2017-09-04 10:45:32.0

Pushed: 2017-09-04 19:56:19.0

Homepage: null

Size: 22862

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Mixpanel Android Library

Latest Version Build Status

June 23, 2017 - v5.1.4

Table of Contents

Quick Start Guide

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

Installation
Dependencies in app/build.gradle

Add Mixpanel and Google Play Services to the dependencies section in app/build.gradle

ile "com.mixpanel.android:mixpanel-android:5.+"
ile "com.google.android.gms:play-services:7.5.0+"
Permissions in app/src/main/AndroidManifest.xml
s-permission android:name="android.permission.INTERNET" />
s-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
s-permission android:name="android.permission.BLUETOOTH" />

Integration
Initialization

Initialize Mixpanel in your main activity app/src/main/java/com/mixpanel/example/myapplication/MainActivity.java. Usually this should be done in onCreate.

ng projectToken = YOUR_PROJECT_TOKEN; // e.g.: "1ef7e30d2a58d27f4b90c42e31d6d7ad" 
anelAPI mixpanel = MixpanelAPI.getInstance(this, projectToken);

Remember to replace YOUR_PROJECT_TOKEN with the token provided to you on mixpanel.com.

Tracking

After installing the library into your Android app, 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.

anel.track("Event name no props")

Object props = new JSONObject();
s.put("Prop name", "Prop value");
s.put("Prop 2", "Value 2");
anel.track("Event name", props);

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.

Want to Contribute?

The Mixpanel library for Android 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 our opening positions for details.

Changelog

See wiki page.

License

LICENSE File for details. The Base64Coder,
igurationChecker, and StackBlurManager classes, and the entirety of the
.mixpanel.android.java_websocket package used by this
ware have been licensed from non-Mixpanel sources and modified
use in the library. Please see the relevant source files, and the
NSE file in the com.mixpanel.android.java_websocket package for details.

StackBlurManager class uses an algorithm by Mario Klingemann <mario@quansimondo.com>
can learn more about the algorithm at
://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.