mixpanel-android-experimental

An Android library for Mixpanel Analytics http://mixpanel.com/android-analytics/

License

License

The Apache Software License, Version 2.0
GroupId

GroupId

com.mixpanel.android
ArtifactId

ArtifactId

mixpanel-android-experimental
Last Version

Last Version

4.6.1-EXPERIMENTAL
Release Date

Release Date

Type

Type

aar
Description

Description

mixpanel-android-experimental
An Android library for Mixpanel Analytics http://mixpanel.com/android-analytics/
Project URL

Project URL

https://github.com/mixpanel/mixpanel-android
Source Code Management

Source Code Management

http://github.com/mixpanel/mixpanel-android

Download mixpanel-android-experimental

How to add to project

<!-- https://jarcasting.com/artifacts/com.mixpanel.android/mixpanel-android-experimental/ -->
<dependency>
    <groupId>com.mixpanel.android</groupId>
    <artifactId>mixpanel-android-experimental</artifactId>
    <version>4.6.1-EXPERIMENTAL</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.mixpanel.android/mixpanel-android-experimental/
implementation 'com.mixpanel.android:mixpanel-android-experimental:4.6.1-EXPERIMENTAL'
// https://jarcasting.com/artifacts/com.mixpanel.android/mixpanel-android-experimental/
implementation ("com.mixpanel.android:mixpanel-android-experimental:4.6.1-EXPERIMENTAL")
'com.mixpanel.android:mixpanel-android-experimental:aar:4.6.1-EXPERIMENTAL'
<dependency org="com.mixpanel.android" name="mixpanel-android-experimental" rev="4.6.1-EXPERIMENTAL">
  <artifact name="mixpanel-android-experimental" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.mixpanel.android', module='mixpanel-android-experimental', version='4.6.1-EXPERIMENTAL')
)
libraryDependencies += "com.mixpanel.android" % "mixpanel-android-experimental" % "4.6.1-EXPERIMENTAL"
[com.mixpanel.android/mixpanel-android-experimental "4.6.1-EXPERIMENTAL"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.android.gms » play-services Optional jar [3.1,)

Project Modules

There are no modules declared in this project.

Mixpanel Android Library

Latest Version Build Status

September 24, 2020 - v5.8.5

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 the following lines to the dependencies section in app/build.gradle

implementation "com.mixpanel.android:mixpanel-android:5.+"
implementation "com.google.firebase:firebase-messaging:17.3.4" // optional, if push notifications are used
implementation "com.android.installreferrer:installreferrer:1.1" // optional, if you want to know how users installed your app

Permissions in app/src/main/AndroidManifest.xml

<!-- This permission is required to allow the application to send events and properties to Mixpanel -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- This permission is optional but recommended so we can be smart about when to send data  -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- This permission is optional but recommended so events will contain information about bluetooth state -->
<uses-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.

String projectToken = YOUR_PROJECT_TOKEN; // e.g.: "1ef7e30d2a58d27f4b90c42e31d6d7ad" 
MixpanelAPI 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.

mixpanel.track("Event name no props")

JSONObject props = new JSONObject();
props.put("Prop name", "Prop value");
props.put("Prop 2", "Value 2");
mixpanel.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 [email protected] 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

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

The StackBlurManager class uses an algorithm by Mario Klingemann <[email protected]>
You can learn more about the algorithm at
http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html.
com.mixpanel.android

Mixpanel, Inc

Powerful, self-serve product analytics to help you convert, engage, and retain more users.

Versions

Version
4.6.1-EXPERIMENTAL