Java SDK

Track customers directly in Java using Woopra’s Java SDK

Download the SDK

Download Java SDK from GitHub

Java SDK Documentation

This SDK allows our users with servers running Java to track visitors by writing only Java code. Tracking directly in Java enables visitor tracking through the back-end without having to handle http requests manually.

Setup the tracker SDK by configuring the tracker instance as follows (replace with your domain as registered on Woopra):

woopra = new WoopraTracker("");

You can then configure the timeout (in milliseconds, defaults to 30000 – equivalent to 30 seconds) after which the event will expire and the visit will be marked as offline:

// set the timeout to 15seconds:

For custom event tracking, create an instance of WoopraEvent:

Note: All Events and properties should be lowercase
event = new WoopraEvent("play", new Object[][] {
   {"artist", "Dave Brubeck"},
   {"song", "Take Five"},
   {"genre", "Jazz"},
// alternatively:
event = new WoopraEvent();
event.setProperty("artist", "Dave Brubeck");
event.setProperty("song", "Take Five");
event.setProperty("genre", "Jazz");

For visitor tracking, create an instance of WoopraVisitor (the user who triggered the event). You can choose to identify the visitor by EMAIL, or with a UNIQUE_ID of your choice (make sure to re-use the same ID for a given visitor across different visits).

// WoopraVisitor identified by email:
visitor = new WoopraVisitor(WoopraVisitor.EMAIL, "");
// WoopraVisitor identified by unique ID:
visitor = new WoopraVisitor(WoopraVisitor.UNIQUE_ID, "MYUNIQUEID");
// In both cases, then add visitor properties:
visitor.setProperty("email", "");
//This step is not required if the visitor has been instantiated by email
visitor.setProperty("name", "John Doe");
visitor.setProperty("company": "My Business");

Now, you’re ready to start tracking events:

woopra.track(visitor, event);

Or just push visitor data (without event tracking):


A day of setup. A lifetime of insights.

Try Woopra for free. No credit cards. No obligations.