--- title: "Event Object" slug: "android-event-object" description: "Create custom events with typed parameters (string, int, double, date, array, boolean) using Insider's Event Object in Android." updated: 2026-10-20T13:10:32Z published: 2026-10-20T13:10:32Z canonical: "academy.insiderone.com/android-event-object" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Event Object The Event object helps you create custom events and event parameters in different data types. This article explains how you can build events and parameters in various data types. ## Set tag event This method returns a new chainable Insider event object in which you can add parameters. Your event name should be lowercase and not include special characters, non-Latin characters, or spaces. Otherwise, this event will be ignored. You can use underscores. | Parameter | Data Type | | --- | --- | | eventName | String | ### Method Signature ```java public InsiderEvent tagEvent(String eventName) ``` ```custom fun tagEvent(eventName: String): InsiderEvent ``` ### Method Example ```java // You can create an event without parameters and call the build method Insider.Instance.tagEvent("eventname").build(); // You can create an event, then add parameters and call the build method Insider.Instance.tagEvent("eventname").addParameterWithInt("key", 10).build(); // You can create an object and add the parameters later InsiderEvent insiderExampleEvent = Insider.Instance.tagEvent("eventname"); // Do not forget to call build method once you are done with parameters //Otherwise your event will be ignored insiderExampleEvent.build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Build event This method allows you to build your Insider **event** object. You need to call this method to trigger your event. ### Method Signature ```java public void build() ``` ```custom fun build() ``` ### Method Example ```java insiderExampleEvent.build(); ``` --- ## Set string parameter This method allows you to set the **string** **parameter** of your Insider **event** object. Your parameter key should be lowercase and should not include any special character, non-Latin character, or any space. Otherwise, this parameter will be ignored. You can use underscores. | Parameter | Data Type | | --- | --- | | key | String | | value | String | The value can be up to 50,000 characters. For arrays, the limit applies to each string. An event with a longer value isn't recorded. ### Method Signature ```java public InsiderEvent addParameterWithString(String key, String value) ``` ```custom fun addParameterWithString(key: String, value: String): InsiderEvent ``` ### Method Example ```java // You can create an event then add parameters and call the build method Insider.Instance.tagEvent("eventname").addParameterWithString("key", "value").build(); // You can create an object and add the parameters later InsiderEvent insiderExampleEvent = Insider.Instance.tagEvent("eventname"); insiderExampleEvent.addParameterWithString("key", "value"); // Do not forget to call build method once you are done with parameters. // Otherwise your event will be ignored. insiderExampleEvent.build(); ``` --- ## Set integer parameter This method allows you to set the **integer** **parameter** of your Insider **event** object. Your parameter key should be lowercase and should not include any special character, non-Latin character or any space. Otherwise, this parameter will be ignored. You can use underscores. | Parameter | Data Type | | --- | --- | | key | String | | value | Integer | ### Method Signature ```java public InsiderEvent addParameterWithInt(String key, int value) ``` ```custom fun addParameterWithInt(key: String, value: Int): InsiderEvent ``` ### Method Example ```java // You can create an event then add parameters and call the build method Insider.Instance.tagEvent("eventname").addParameterWithInt("key", 10).build(); // You can create an object and add the parameters later InsiderEvent insiderExampleEvent = Insider.Instance.tagEvent("eventname"); insiderExampleEvent.addParameterWithInt("key", 10); // Do not forget to call build method once you are done with parameters. // Otherwise your event will be ignored. insiderExampleEvent.build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Set double parameter This method allows you to set the **double** **parameter** of your Insider **event** object. Your parameter key should be lowercase and should not include any special character, non-Latin character or any space. Otherwise, this parameter will be ignored. You can use underscores. | Parameter | Data Type | | --- | --- | | key | String | | value | Double | ### Method Signature ```java public InsiderEvent addParameterWithDouble(String key, double value) ``` ```custom fun addParameterWithDouble(key: String, value: Double): InsiderEvent ``` ### Method Example ```java // You can create an event then add parameters and call the build method Insider.Instance.tagEvent("eventname").addParameterWithDouble("key", 10.5).build(); // You can create an object and add the parameters later InsiderEvent insiderExampleEvent = Insider.Instance.tagEvent("eventname"); insiderExampleEvent.addParameterWithDouble("key", 10.5); // Do not forget to call build method once you are done with parameters. // Otherwise your event will be ignored. insiderExampleEvent.build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Set date parameter This method allows you to set the **date** **parameter** of your Insider **event** object. Your parameter key should be lowercase and should not include any special character, non-Latin character or any space. Otherwise, this parameter will be ignored. You can use underscores. | Parameter | Data Type | | --- | --- | | key | String | | value | Date | ### Method Signature ```java public InsiderEvent addParameterWithDate(String key, Date value) ``` ```custom fun addParameterWithDate(key: String, value: Date): InsiderEvent ``` ### Method Example ```java Date date = new Date(); // You can create an event then add parameters and call the build method Insider.Instance.tagEvent("eventname").addParameterWithDate("key", date);.build(); // You can create an object and add the parameters later InsiderEvent insiderExampleEvent = Insider.Instance.tagEvent("eventname"); insiderExampleEvent.addParameterWithDate("key", date); // Do not forget to call build method once you are done with parameters. // Otherwise your event will be ignored. insiderExampleEvent.build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Set array of string parameter This method allows you to set the **array of string** **parameter** of your Insider **event** object. Your parameter key should be lowercase and should not include any special character, non-Latin character, or any space. Otherwise, this parameter will be ignored. You can use underscores.You can call this method only with an array of string. Otherwise, this parameter will be ignored. | Parameter | Data Type | | --- | --- | | key | String | | value | Array (of string) | The value can be up to 50,000 characters. For arrays, the limit applies to each string. An event with a longer value isn't recorded. ### Method Signature ```java InsiderEvent addParameterWithStringArray(String key, String[] values) ``` ```custom fun addParameterWithStringArray(key: String, values: Array): InsiderEvent ``` ### Method Example ```java String[] stringArray = new String[]{"value1", "value2", "value3"}; Insider.Instance.tagEvent("eventName") .addParameterWithStringArray("key", stringArray) .build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Set array of number parameter This method allows you to set the **array of number** **parameter** of your Insider **event** object. Your parameter key should be only numbers. Otherwise, this parameter will be ignored.You can call this method only with an array of string. Otherwise this parameter will be ignored. | Parameter | Data Type | | --- | --- | | key | Number | | value | Array (of number) | ### Method Signature ```java InsiderEvent addParameterWithNumericArray(String key, Number[] values) ``` ```custom fun addParameterWithNumericArray(key: String, values: Array): InsiderEvent ``` ### Method Example ```java Number[] numberArray = new Number[]{5, 3.14, 100}; Insider.Instance.tagEvent("eventName") .addParameterWithNumericArray("key", numberArray) .build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Set boolean parameter This method allows you to set the **boolean** **parameter** of your Insider **event** object. Your parameter key should be lowercase and should not include any special character, non-Latin character or any space. Otherwise, this parameter will be ignored. You can use underscores. | Parameter | Data Type | | --- | --- | | key | String | | value | Boolean | ### Method Signature ```java public InsiderEvent addParameterWithBoolean(String key, boolean value) ``` ```custom fun addParameterWithBoolean(key: String, value: Boolean): InsiderEvent ``` ### Method Example ```java // You can create an event then add parameters and call the build method Insider.Instance.tagEvent("eventname").addParameterWithBoolean("key", true).build(); // You can create an object and add the parameters later InsiderEvent insiderExampleEvent = Insider.Instance.tagEvent("eventname"); insiderExampleEvent.addParameterWithBoolean("key", true); // Do not forget to call build method once you are done with parameters. // Otherwise your event will be ignored. insiderExampleEvent.build(); ``` If you do not call Insider One's Build Event method at the end of the chaining, this method will not function. --- ## Set array of objects parameter This method allows you to set the **Array of Objects parameter** of your Insider **event** object. Create the parameter first, as described in [Create the Array of Objects Event Parameter](/v1/docs/create-the-array-of-objects-event-parameter). The SDK never creates or changes the parameter definition. The SDK ignores keys not defined in the panel, and the call still succeeds. - The parameter key and every key inside the objects must be lowercase, with no special or non-Latin characters. Other keys are ignored. - Data that breaks a limit is dropped before sending, and each drop is logged. This covers key naming, strings longer than 500 characters, more than two nesting levels, an Array of Objects inside an object, arrays with mixed item types, and too many keys per object. - The object and key limits come from your account settings. Without them, the SDK uses **50 objects** and **20 keys** per object. | Parameter | Data Type | Description | | --- | --- | --- | | key | String | Name of the Array of Objects event parameter. | | objects | List> | Objects to send with the event. | ### Method Signature ```java public InsiderEvent addParameterWithObjectArray(String key, List> objects) ``` ```custom fun addParameterWithObjectArray(key: String, objects: List>): InsiderEvent ``` ### Method Example ```java import com.useinsider.insider.InsiderEvent; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; void sendCartEvent(InsiderEvent event) { Map product = new HashMap<>(); product.put("sku", "p100"); product.put("quantity", 2); List> products = new ArrayList<>(); products.add(product); event.addParameterWithObjectArray("products", products).build(); } ``` ```custom import com.useinsider.insider.InsiderEvent fun sendCartEvent(event: InsiderEvent) { val products = listOf( mapOf("sku" to "p100", "quantity" to 2) ) event.addParameterWithObjectArray("products", products).build() } ``` Array of Objects event parameters are insert-only, so you **cannot update** them later. Calling the method again with the same key replaces the earlier list. Invalid objects are dropped one by one, and the call still succeeds. A null or empty list does nothing.If the list has more objects than the object limit, the SDK logs a warning and still sends it. Trim long lists before you call the method. --- ## Set multiple parameter This method allows you to set **more than** **one** **parameter** of your Insider **event** object at a time. | Parameter | Data Type | | --- | --- | | parameters | Map | ### Method Signature ```java public InsiderEvent addParameters(Map parameters) ``` ```custom fun addParameters(parameters: Map): InsiderEvent ``` ### Method Example ```java String[] array = new String[3]; array[0] = "item1"; array[1] = "item2"; array[2] = "item3"; Map parameters = new HashMap<>(); parameters.put("tag_array", array); parameters.put("tag_bool", true); parameters.put("tag_double", 22.2); parameters.put("tag_string", "insider"); parameters.put("tag_date", new Date()); parameters.put("tag_int", 122); Insider.Instance.tagEvent("test_event").addParameters(parameters).build(); ```