mixpanel-java

A library for tracking Mixpanel events and updating Mixpanel people analytics profiles within Java applications.

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.mixpanel
ArtifactId

ArtifactId

mixpanel-java
Last Version

Last Version

1.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

mixpanel-java
A library for tracking Mixpanel events and updating Mixpanel people analytics profiles within Java applications.
Project URL

Project URL

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

Source Code Management

https://github.com/mixpanel/mixpanel-java

Download mixpanel-java

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.json : json jar 20090211

test (1)

Group / Artifact Type Version
junit : junit jar 3.8.1

Project Modules

There are no modules declared in this project.

This is the official Mixpanel tracking library for Java.

Latest Version

September 19th, 2019 - v1.5.0
<dependency>
    <groupId>com.mixpanel</groupId>
    <artifactId>mixpanel-java</artifactId>
    <version>1.5.0</version>
</dependency>

You can alternatively download the library jar directly from Maven here.

How To Use

The library is designed to produce events and people updates in one process or thread, and consume the events and people updates in another thread or process. Specially formatted JSON objects are built by MessageBuilder objects, and those messages can be consumed by the MixpanelAPI via ClientDelivery objects, possibly after serialization or IPC.

MessageBuilder messages = new MessageBuilder("my token");
JSONObject event = messages.event("[email protected]", "Logged In", null);

// Later, or elsewhere...
ClientDelivery delivery = new ClientDelivery();
delivery.addMessage(event);

MixpanelAPI mixpanel = new MixpanelAPI();
mixpanel.deliver(delivery);

Learn More

This library in particular has more in-depth documentation at

https://mixpanel.com/docs/integration-libraries/java

Mixpanel maintains documentation at

http://www.mixpanel.com/docs

The library also contains a simple demo application, that demonstrates using this library in an asynchronous environment.

There are also community supported libraries in addition to this library, that provide a threading model, support for dealing directly with Java Servlet requests, support for persistent properties, etc. Two interesting ones are at:

https://github.com/eranation/mixpanel-java
https://github.com/scalascope/mixpanel-java

Other Mixpanel Libraries

Mixpanel also maintains a full-featured library for tracking events from Android apps at https://github.com/mixpanel/mixpanel-android

And a full-featured client side library for web applications, in Javascript, that can be loaded directly from Mixpanel servers. To learn more about our Javascript library, see: https://mixpanel.com/docs/integration-libraries/javascript

This library is intended for use in back end applications or API services that can't take advantage of the Android libraries or the Javascript library.

License

See LICENSE File for details. The Base64Coder class used by this software
has been licensed from non-Mixpanel sources and modified for use in the library.
Please see Base64Coder.java for details.
com.mixpanel

Mixpanel, Inc

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

Versions

Version
1.5.0
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.0
1.2.1
1.2.0
1.1.4
1.1.3
1.1.2
1.1.0
1.0.1