Skip to content
A simple Mixpanel API for Java
Java
Find file
Latest commit 972d827 Dec 10, 2013 @ospector ospector deploy 0.0.3
Failed to load latest commit information.
localrepo/org/eranmedan/mixpanel-java
src
.classpath Initial commit Nov 17, 2012
.gitattributes gitattributes Nov 17, 2012
.gitignore local maven repo Nov 17, 2012
.project
LICENSE Added license Nov 17, 2012
README.md Update README.md Nov 17, 2012
pom.xml track API did not pass additional properties Dec 10, 2013

README.md

mixpanel-java

A simple Mixpanel API for Java

Installation

<repositories>
  ...
  <repository>
    <id>github-repo</id>
    <url>http://raw.github.com/eranation/mixpanel-java/master/localrepo</url>
  </repository>
</repositories>
...
<dependencies>
  ...
  <dependency>
    <groupId>org.eranmedan</groupId>
    <artifactId>mixpanel-java</artifactId>
    <version>0.0.2-SNAPSHOT</version>
  </dependency>
</dependencies>

Example usage

 String uniqueId = "50479b24671bf";
 String nameTag = "Test Name";
 String ip = "123.123.123.123";
 Date time = new Date();
 String token = "e3bc4100330c35722740fb8c6f5abddc";
 Map<String, String> props = new HashMap<String, String>();
 props.put("action", "play");
 Logger logger = LoggerFactory.getLogger("MixpanelAPI Test Logger");

 MixpanelAPI mixpanelAPI = new MixpanelAPI(token, logger);

 mixpanelAPI.track("test1", uniqueId, props);
 mixpanelAPI.track("test2", uniqueId, nameTag, ip, time, props);
 mixpanelAPI.track("test3", uniqueId, nameTag, ip, time);
 mixpanelAPI.track("test4", uniqueId, nameTag, ip);
 mixpanelAPI.track("test5", uniqueId, nameTag);
 mixpanelAPI.track("test6", uniqueId);

Tests

# in the src/test/java directory

mvn test

Attribution/Credits

Copyright (c) 2012 Eran Medan

License

Released under the MIT license. See file called LICENSE for more details.

Something went wrong with that request. Please try again.