Skip to main content


Percept Java SDK

Getting Started

  1. Add the following lines to your package's pom.xml file to include the dependency:

Create Event

// Instantiate a PerceptAPI object by initializing the token.
PerceptAPI perceptAPI = new PerceptAPI.Builder("apiToken").build();

// Instantiate a PerceptAPI object with custom values by initializing the token.
PerceptAPI perceptAPI = new PerceptAPI.Builder("apiToken")

// Event Builder for building events
EventBuilder eventBuilder = new EventBuilder();

// Create an event without properties
Event event = eventBuilder.createEvent("App Open", "USR123", null);

// Capture the event

// Create an EventCollection for batching events
EventCollection eventCollection = new EventCollection();

// Create properties for an event
JsonObject eventData = new JsonObject();
eventData.addProperty("attribute1", "value1");
eventData.addProperty("attribute2", "value2");

// Create an event with properties
Event eventWithProp = eventBuilder.createEvent("Test", "USR789", eventData);

// Add the event with properties to the collection

// Capture the entire event collection


If you have any questions, issues, or need assistance with Percept, here are the available support channels:

Please feel free to reach out to us with any concerns or inquiries. We'll do our best to assist you and provide timely support.