Mixpanel Client

A friendly wrapper around the main Mixpanel Java client with added async support for high throughput applications

Categories

Categories

CLI User Interface
GroupId

GroupId

com.brandwatch.mixpanel
ArtifactId

ArtifactId

mixpanel-client
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Mixpanel Client
A friendly wrapper around the main Mixpanel Java client with added async support for high throughput applications
Source Code Management

Source Code Management

https://github.com/BrandwatchLtd/async-mixpanel-client

Download mixpanel-client

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
com.mixpanel : mixpanel-java jar 1.4.3
org.slf4j : slf4j-api jar 1.7.12

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.hamcrest : hamcrest-all jar 1.3

Project Modules

There are no modules declared in this project.

async-mixpanel-client

Build Status Coverage Status Maven Central

What Is This?

This repo hosts a wrapper around the official Mixpanel Java client.

Why?

The official Mixpanel client falls down in a few ways. First it relies a lot on null parameters. When something is optional you just don't pass it in. However this can be confusing and can make code more complicated than is required so this wrapper provides full methods for every valid combination of parameters.

Second the official client is synchronous adding delay to your code. We live in a multicore world these days so this wrapper offloads that sending delay to another thread and deals with queueing and scheduling for you.

How?

To add the dependency to Maven:

<dependency>
  <groupId>com.brandwatch.mixpanel</groupId>
  <artifactId>mixpanel-client</artifactId>
  <version>${mixpanel.version}</version>
</dependency>

You can find the latest version number on the releases page.

ClientConfig config = new ClientConfigBuilder()
                          .maxBatchSize(1000)
                          .maxBatchTimeInSeconds(10)
                          .projectToken("aaabbbccc111222333")
                          .build();

MixpanelClient client = new MixpanelClient(config);

client.event("my-event-key");

Requirements

Java 8 or above

Building The Project

mvn clean package

Licence

This library is made avaliable under the LGPL 3.0 licence. Please see LICENCE.txt for more details.

com.brandwatch.mixpanel

Versions

Version
0.1.1