Overview
Choose your SDK version below:
- Apptrove SDK → Recommended for all projects (Latest: v2.0.0)
- Trackier SDK → Will be deprecated in May 2026 (v1.x.xx)
Use the tabs below to view event tracking code for your chosen SDK.
This guide provides instructions for tracking user interactions in your Android application using the SDK's Event object. Event tracking offers insights into how users engage with your app, supporting both built-in and custom events.
Prerequisites
- Access to the Dashboard for configuring custom events
- Basic knowledge of Android development (Java or Kotlin)
Event Tracking
The SDK provides an Event object to structure and send event information from your app to servers. Events can be triggered by user actions, such as button clicks, and support both built-in and custom configurations.
1. Built-in Events
Built-in events are predefined constants available on the dashboard. You can implement these events directly in your app to track common user interactions.

Supported Built-in Events
LOGINREGISTERLOGOUTPURCHASECHECKOUT_STARTEDCHECKOUT_COMPLETEDADD_TO_WISHLISTCONTENT_VIEWVIEW_CARTREMOVE_FROM_CARTSEARCHPRODUCT_VIEWUPDATEINVITESHARESTART_TRIALSUBSCRIBECOMPLETE_REGISTERACHIEVEMENT_UNLOCKTUTORIAL_COMPLETEAPP_OPENTRAVEL_BOOKINGPRODUCT_SEARCHREGISTRATIONADD_TO_CARTLEVEL_ACHIEVED
In-built Parameters
You can include additional data with events using the following parameters:
orderIdrevenuecurrencyparam1,param2,param3,param4,param5,param6,param7,param8,param9,param10
The argument passed to the Event class is the event ID (e.g., Event.LOGIN for built-in events).
Usage
Create an Event instance and trigger it on a user action, such as a button click. Below are examples for tracking a LOGIN event.
Track Event Example
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating May 2026)
- Java
- Kotlin
private void eventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "AppTroveEvent.LOGIN" passed in the AppTrove event class is Events id
AppTroveEvent event = new AppTroveEvent(AppTroveEvent.LOGIN);
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1";
event.param2 = "Param 2";
event.param3 = "Param 3";
event.param4 = "Param 4";
event.param5 = "Param 5";
AppTroveSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
fun eventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "AppTroveEvent.LOGIN" passed in the AppTrove event class is Events id.
val event = AppTroveEvent(AppTroveEvent.LOGIN)
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1"
event.param2 = "Param 2"
event.param3 = "Param 3"
event.param4 = "Param 4"
event.param5 = "Param 5"
AppTroveSDK.trackEvent(event)
Log.d("TAG", "onClick: event_track ")
}
- Java
- Kotlin
private void eventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "TrackierEvent.LOGIN" passed in the Trackier event class is Events id
TrackierEvent event = new TrackierEvent(TrackierEvent.LOGIN);
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1";
event.param2 = "Param 2";
event.param3 = "Param 3";
event.param4 = "Param 4";
event.param5 = "Param 5";
TrackierSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
fun eventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "TrackierEvent.LOGIN" passed in the Trackier event class is Events id.
val event = TrackierEvent(TrackierEvent.LOGIN)
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1"
event.param2 = "Param 2"
event.param3 = "Param 3"
event.param4 = "Param 4"
event.param5 = "Param 5"
TrackierSDK.trackEvent(event)
Log.d("TAG", "onClick: event_track ")
}
2. Custom Events
Custom events are defined in the dashboard and identified by unique event IDs. Use these to track app-specific interactions not covered by built-in events.

Usage
Create an Event instance with the custom event ID from the dashboard and trigger it as needed.
- ✓ Apptrove SDK
- Trackier SDK
- Java
- Kotlin
private void customEventsTracking(){
// Below are the example of customs events function calling
// The arguments - "sEMWSCTXeu" passed in the event class is Events id
AppTroveEvent event = new AppTroveEvent("sEMWSCTXeu");
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1";
event.param2 = "Param 2";
event.param3 = "Param 3";
event.param4 = "Param 4";
event.param5 = "Param 5";
AppTroveSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
fun customEventsTracking() {
// Below are the example of customs events function calling
// The arguments - "sEMWSCTXeu" passed in the event class is Events id
val event = AppTroveEvent("sEMWSCTXeu")
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1"
event.param2 = "Param 2"
event.param3 = "Param 3"
event.param4 = "Param 4"
event.param5 = "Param 5"
AppTroveSDK.trackEvent(event)
Log.d("TAG", "onClick: event_curr_track ")
}
- Java
- Kotlin
private void customEventsTracking(){
// Below are the example of customs events function calling
// The arguments - "sEMWSCTXeu" passed in the event class is Events id
TrackierEvent event = new TrackierEvent("sEMWSCTXeu");
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1";
event.param2 = "Param 2";
event.param3 = "Param 3";
event.param4 = "Param 4";
event.param5 = "Param 5";
TrackierSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
fun customEventsTracking() {
// Below are the example of customs events function calling
// The arguments - "sEMWSCTXeu" passed in the event class is Events id
val event = TrackierEvent("sEMWSCTXeu")
/* Below are the function for the adding the extra data,
You can add the extra data like login details of user or anything you need.
We have 10 params to add data, Below 5 are mentioned */
event.param1 = "Param 1";
event.param2 = "Param 2"
event.param3 = "Param 3"
event.param4 = "Param 4"
event.param5 = "Param 5"
TrackierSDK.trackEvent(event)
Log.d("TAG", "onClick: event_curr_track ")
}
3. Complete Event Tracking Example
This comprehensive example demonstrates how to track a COMPLETE_REGISTRATION event with all available parameters, user data, and custom attributes.
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating May 2026)
- Java
- Kotlin
public static void trackCompleteRegistration() {
// Create event with COMPLETE_REGISTRATION ID (String) or Custom Event ID
AppTroveEvent event = new AppTroveEvent(AppTroveEvent.COMPLETE_REGISTRATION);
// Alternatively: AppTroveEvent event = new AppTroveEvent("w43424"); // Pass your Event ID
// Built-in fields for event tracking
event.orderId = "REG_001"; // String: Unique registration ID
event.productId = "FREE_PLAN"; // String: Plan or product ID
event.currency = "USD"; // String: Currency code
event.couponCode = "343434234"; // String: Coupon code used
event.discount = 3.1415f; // Float: Discount applied (or null)
event.revenue = 34234234.32423; // Double: Revenue (or null for free signup)
// Custom parameters for structured data
// Data type: String - You can add any string value here
event.param1 = "Test1"; // String: Dummy value
event.param2 = "Test2"; // String: Dummy value
event.param3 = "Test3"; // String: Dummy value
event.param4 = "Test4"; // String: Dummy value
event.param5 = "Test5"; // String: Dummy value
event.param6 = "Test6"; // String: Dummy value
event.param7 = "Test7"; // String: Dummy value
event.param8 = "Test8"; // String: Dummy value
event.param9 = "Test9"; // String: Dummy value
event.param10 = "Test10"; // String: Dummy value
// Custom key-value pairs for flexible data (HashMap<String, Object>)
HashMap<String, Object> customParams = new HashMap<>();
customParams.put("signup_time", 1631234567890L); // Long: Timestamp
customParams.put("device", "Android"); // String: Device type
event.ev = customParams;
// Set user details in AppTrove SDK
AppTroveSDK.setUserId("USER123"); // String: User ID
AppTroveSDK.setUserEmail("user@example.com"); // String: User email
AppTroveSDK.setUserName("Jane Doe"); // String: User name
AppTroveSDK.setUserPhone("+1234567890"); // String: User phone
AppTroveSDK.setDOB("1990-01-01"); // String: Date of birth (YYYY-MM-DD)
AppTroveSDK.setGender(AppTroveSDK.Gender.Male); // Gender: Male, Female, or Others
AppTroveSDK.setIMEI("123456789012345", "987654321098765"); // String, String: Device IMEI
AppTroveSDK.setMacAddress("00:1A:2B:3C:4D:5E"); // String: Device MAC address
// Additional user details (HashMap<String, Object>)
HashMap<String, Object> userDetails = new HashMap<>();
userDetails.put("Plan", "FREE_PLAN");
userDetails.put("SignupMethod", "Email");
AppTroveSDK.setUserAdditionalDetails(userDetails);
// Send the event to AppTrove
AppTroveSDK.trackEvent(event);
}
fun trackCompleteRegistration() {
// Create event with COMPLETE_REGISTRATION ID (String) or Custom Event ID
val event = AppTroveEvent(AppTroveEvent.COMPLETE_REGISTRATION) // Or AppTroveEvent("w43424")
// Built-in fields for event tracking
event.orderId = "REG_001" // String?: Unique registration ID
event.productId = "FREE_PLAN" // String?: Plan or product ID
event.currency = "USD" // String?: Currency code
event.couponCode = "343434234" // String?: Coupon code used
event.discount = 3.1415f // Float?: Discount applied or null
event.revenue = 34234234.32423 // Double?: Revenue or null
// Custom parameters for structured data
// Datatype: String? → You can add any string value here
event.param1 = "Test1" // String?: Dummy value
event.param2 = "Test2" // String?: Dummy value
event.param3 = "Test3" // String?: Dummy value
event.param4 = "Test4" // String?: Dummy value
event.param5 = "Test5" // String?: Dummy value
event.param6 = "Test6" // String?: Dummy value
event.param7 = "Test7" // String?: Dummy value
event.param8 = "Test8" // String?: Dummy value
event.param9 = "Test9" // String?: Dummy value
event.param10 = "Test10" // String?: Dummy value
// Custom key-value pairs for flexible data (MutableMap<String, Any>)
val customParams = mutableMapOf<String, Any>()
customParams["signup_time"] = 1631234567890L // Long: Timestamp
customParams["device"] = "Android" // String: Device type
event.ev = customParams
// Set user details in AppTrove SDK
AppTroveSDK.setUserId("USER123") // String: User ID
AppTroveSDK.setUserEmail("user@example.com") // String: User email
AppTroveSDK.setUserName("Jane Doe") // String: User name
AppTroveSDK.setUserPhone("+1234567890") // String: User phone
AppTroveSDK.setDOB("1990-01-01") // String: Date of birth (YYYY-MM-DD)
AppTroveSDK.setGender(AppTroveSDK.Gender.Male) // Gender: Male, Female, or Others
AppTroveSDK.setIMEI("123456789012345", "987654321098765") // String, String: Device IMEI
AppTroveSDK.setMacAddress("00:1A:2B:3C:4D:5E") // String: Device MAC address
// Additional user details (MutableMap<String, Any>)
val userDetails: MutableMap<String, Any> = mutableMapOf()
userDetails["Plan"] = "FREE_PLAN"
userDetails["SignupMethod"] = "Email"
AppTroveSDK.setUserAdditionalDetails(userDetails)
// Send the event to AppTrove
AppTroveSDK.trackEvent(event)
}
- Java
- Kotlin
public static void trackCompleteRegistration() {
// Create event with COMPLETE_REGISTRATION ID (String) or Custom Event ID
TrackierEvent event = new TrackierEvent(TrackierEvent.COMPLETE_REGISTRATION);
// Alternatively: TrackierEvent event = new TrackierEvent("w43424"); // Pass your Event ID
// Built-in fields for event tracking
event.orderId = "REG_001"; // String: Unique registration ID
event.productId = "FREE_PLAN"; // String: Plan or product ID
event.currency = "USD"; // String: Currency code
event.couponCode = "343434234"; // String: Coupon code used
event.discount = 3.1415f; // Float: Discount applied (or null)
event.revenue = 34234234.32423; // Double: Revenue (or null for free signup)
// Custom parameters for structured data
// Data type: String - You can add any string value here
event.param1 = "Test1"; // String: Dummy value
event.param2 = "Test2"; // String: Dummy value
event.param3 = "Test3"; // String: Dummy value
event.param4 = "Test4"; // String: Dummy value
event.param5 = "Test5"; // String: Dummy value
event.param6 = "Test6"; // String: Dummy value
event.param7 = "Test7"; // String: Dummy value
event.param8 = "Test8"; // String: Dummy value
event.param9 = "Test9"; // String: Dummy value
event.param10 = "Test10"; // String: Dummy value
// Custom key-value pairs for flexible data (HashMap<String, Object>)
HashMap<String, Object> customParams = new HashMap<>();
customParams.put("signup_time", 1631234567890L); // Long: Timestamp
customParams.put("device", "Android"); // String: Device type
event.ev = customParams;
// Set user details in Trackier SDK
TrackierSDK.setUserId("USER123"); // String: User ID
TrackierSDK.setUserEmail("user@example.com"); // String: User email
TrackierSDK.setUserName("Jane Doe"); // String: User name
TrackierSDK.setUserPhone("+1234567890"); // String: User phone
TrackierSDK.setDOB("1990-01-01"); // String: Date of birth (YYYY-MM-DD)
TrackierSDK.setGender(TrackierSDK.Gender.Male); // Gender: Male, Female, or Others
TrackierSDK.setIMEI("123456789012345", "987654321098765"); // String, String: Device IMEI
TrackierSDK.setMacAddress("00:1A:2B:3C:4D:5E"); // String: Device MAC address
// Additional user details (HashMap<String, Object>)
HashMap<String, Object> userDetails = new HashMap<>();
userDetails.put("Plan", "FREE_PLAN");
userDetails.put("SignupMethod", "Email");
TrackierSDK.setUserAdditionalDetails(userDetails);
// Send the event to Trackier
TrackierSDK.trackEvent(event);
}
fun trackCompleteRegistration() {
// Create event with COMPLETE_REGISTRATION ID (String) or Custom Event ID
val event = TrackierEvent(TrackierEvent.COMPLETE_REGISTRATION) // Or TrackierEvent("w43424")
// Built-in fields for event tracking
event.orderId = "REG_001" // String?: Unique registration ID
event.productId = "FREE_PLAN" // String?: Plan or product ID
event.currency = "USD" // String?: Currency code
event.couponCode = "343434234" // String?: Coupon code used
event.discount = 3.1415f // Float?: Discount applied or null
event.revenue = 34234234.32423 // Double?: Revenue or null
// Custom parameters for structured data
// Datatype: String? → You can add any string value here
event.param1 = "Test1" // String?: Dummy value
event.param2 = "Test2" // String?: Dummy value
event.param3 = "Test3" // String?: Dummy value
event.param4 = "Test4" // String?: Dummy value
event.param5 = "Test5" // String?: Dummy value
event.param6 = "Test6" // String?: Dummy value
event.param7 = "Test7" // String?: Dummy value
event.param8 = "Test8" // String?: Dummy value
event.param9 = "Test9" // String?: Dummy value
event.param10 = "Test10" // String?: Dummy value
// Custom key-value pairs for flexible data (MutableMap<String, Any>)
val customParams = mutableMapOf<String, Any>()
customParams["signup_time"] = 1631234567890L // Long: Timestamp
customParams["device"] = "Android" // String: Device type
event.ev = customParams
// Set user details in Trackier SDK
TrackierSDK.setUserId("USER123") // String: User ID
TrackierSDK.setUserEmail("user@example.com") // String: User email
TrackierSDK.setUserName("Jane Doe") // String: User name
TrackierSDK.setUserPhone("+1234567890") // String: User phone
TrackierSDK.setDOB("1990-01-01") // String: Date of birth (YYYY-MM-DD)
TrackierSDK.setGender(TrackierSDK.Gender.Male) // Gender: Male, Female, or Others
TrackierSDK.setIMEI("123456789012345", "987654321098765") // String, String: Device IMEI
TrackierSDK.setMacAddress("00:1A:2B:3C:4D:5E") // String: Device MAC address
// Additional user details (MutableMap<String, Any>)
val userDetails: MutableMap<String, Any> = mutableMapOf()
userDetails["Plan"] = "FREE_PLAN"
userDetails["SignupMethod"] = "Email"
TrackierSDK.setUserAdditionalDetails(userDetails)
// Send the event to Trackier
TrackierSDK.trackEvent(event)
}
4. Revenue Events
Revenue events track in-app revenue, including the amount and currency, to monitor app monetization.
Usage
Create an Event instance, set the revenue and currency fields, and trigger the event.
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating May 2026)
- Java
- Kotlin
private void revenueEventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "AppTroveEvent.LOGIN" passed in the event class is Events id
AppTroveEvent event = new AppTroveEvent("sEMWSCTXeu");
// Passing the revenue events be like below example
event.revenue = 2.5; // Pass your generated revenue here.
event.currency = "USD"; // Pass your currency here.
AppTroveSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
fun revenueEventsTracking() {
// Below are the example of custom events function calling
// The arguments - "sEMWSCTXeu" passed in the event class is Events id
val event = AppTroveEvent("sEMWSCTXeu")
// Passing the revenue events be like below example
event.revenue = 2.5 // Pass your generated revenue here.
event.currency = "USD" // Pass your currency here.
AppTroveSDK.trackEvent(event)
Log.d("TAG", "onClick: event_curr_track ")
}
- Java
- Kotlin
private void revenueEventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "TrackierEvent.LOGIN" passed in the event class is Events id
TrackierEvent event = new TrackierEvent("sEMWSCTXeu");
// Passing the revenue events be like below example
event.revenue = 2.5; // Pass your generated revenue here.
event.currency = "USD"; // Pass your currency here.
TrackierSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
fun revenueEventsTracking() {
// Below are the example of custom events function calling
// The arguments - "sEMWSCTXeu" passed in the event class is Events id
val event = TrackierEvent("sEMWSCTXeu")
// Passing the revenue events be like below example
event.revenue = 2.5 // Pass your generated revenue here.
event.currency = "USD" // Pass your currency here.
TrackierSDK.trackEvent(event)
Log.d("TAG", "onClick: event_curr_track ")
}
5. Custom Parameters in Events
You can pass additional custom parameters using a mutable map, which is assigned to the ev field of the Event object.
Usage
Create a mutable map, add custom parameters, and assign it to the event's ev field before tracking.
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating May 2026)
- Java
- Kotlin
private void customEventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "AppTroveEvent.LOGIN" passed in the event class is Events id
AppTroveEvent event = new AppTroveEvent("sEMWSCTXeu");
// Passing the extra data through custom params
HashMap<String,Object> eventCustomParams= new HashMap<>();
eventCustomParams.put("customParam1","xxxxxx");
eventCustomParams.put("customParam2","xxxxxx");
event.ev = eventCustomParams; // Pass the reference to the ev
AppTroveSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
private fun customEventsTracking() {
// Below is an example of a custom event function call
// The argument "sEMWSCTXeu" passed in the event class is the Event ID
val event = AppTroveEvent("sEMWSCTXeu")
// Passing extra data through custom params
val eventCustomParams = mutableMapOf<String, Any>()
eventCustomParams["customParam1"] = "xxxxxx"
eventCustomParams["customParam2"] = "xxxxxx"
event.ev = eventCustomParams // Pass the reference to ev
AppTroveSDK.trackEvent(event)
Log.d("TAG", "onClick: event_track")
}
- Java
- Kotlin
private void customEventsTracking(){
// Below are the example of built-in events function calling
// The arguments - "TrackierEvent.LOGIN" passed in the event class is Events id
TrackierEvent event = new TrackierEvent("sEMWSCTXeu");
// Passing the extra data through custom params
HashMap<String,Object> eventCustomParams= new HashMap<>();
eventCustomParams.put("customParam1","xxxxxx");
eventCustomParams.put("customParam2","xxxxxx");
event.ev = eventCustomParams; // Pass the reference to the ev
TrackierSDK.trackEvent(event);
Log.d("TAG", "onClick: event_track ");
}
private fun customEventsTracking() {
// Below is an example of a custom event function call
// The argument "sEMWSCTXeu" passed in the event class is the Event ID
val event = TrackierEvent("sEMWSCTXeu")
// Passing extra data through custom params
val eventCustomParams = mutableMapOf<String, Any>()
eventCustomParams["customParam1"] = "xxxxxx"
eventCustomParams["customParam2"] = "xxxxxx"
event.ev = eventCustomParams // Pass the reference to ev
TrackierSDK.trackEvent(event)
Log.d("TAG", "onClick: event_track")
}
Best Practices
- Use built-in events for standard interactions to simplify integration.
- Define custom events in the Trackier dashboard for app-specific actions.
- Include relevant parameters (e.g.,
revenue,currency) for revenue events to ensure accurate monetization tracking. - Test events in
"testing"mode before switching to"production". - Use meaningful parameter names for custom parameters to improve reporting clarity.
- Set user data before tracking events to ensure proper attribution.
- Use consistent data types and formats across all parameters.
Troubleshooting
- Events Not Tracking: Verify the SDK is initialized and the correct event ID is used.
- Invalid Parameters: Ensure parameter names match those defined in the Trackier dashboard.
- Revenue Issues: Confirm the
revenueandcurrencyfields are set correctly. - User Data Issues: Ensure user data is set before tracking events.