--- title: "Default Mobile Events" slug: "android-default-mobile-events" description: "Reference for Insider One's default Android SDK events, like Homepage View, Add to Cart, and Purchase, including method signatures and code examples." tags: ["android sdk"] updated: 2026-09-25T14:36:08Z published: 2026-09-25T14:36:08Z canonical: "academy.insiderone.com/android-default-mobile-events" --- > ## 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. # Events Below, you can see a list of default mobile events along with their method signatures and examples: - [SDK Events](/docs/android-default-mobile-events#sdk-events) - [Page Visit Events](/docs/android-default-mobile-events#page-visit-events) - [Cart Events](/docs/android-default-mobile-events#cart-events) - [Wishlist Events](/docs/android-default-mobile-events#cart-events) While Insider One automatically triggers SDK events, the other event types need to be implemented by customers. ## SDK events Session events are automatically triggered based on user actions on the application and campaigns and do not require customer configuration. | Event | How does it work? | | --- | --- | | Mobile App Opened | Triggered when the app is opened | | Session Start | Triggered every time a session starts | | Session Start From Push | Triggered if a session starts upon a click on a push notification triggered from an app template. Test pushes do not trigger this event. | | Push Session | Triggered if a session starts upon a click on a push notification. Test pushes do not trigger this event. | | Push Delivered | Triggered when a push is delivered | | App Push Opened | Triggered when an app push is opened | | InApp Seen | Triggered when an inApp is seen along with the inApp ID and variant ID information | | Mobile Social Proof Seen | Triggered when a social proof is seen | --- ## Page visit events You should trigger the page visit events when a user visits the respective page type in the application. The default page visit events include the Homepage View, Listing Page View, Product Detail Page View, Cart Page View, and Confirmation Page View. See below for their method signatures and examples. If you want to trigger any event for any other type of page (e.g., test drive form page, discounts page, etc.), you should define a custom event on the [Test Lab](https://academy.insiderone.com/docs/creating-events-and-attributes-for-test-lab). ### Homepage View This method lets you tag visits to your homepage as an event. You can call this method each time a user visits your homepage. #### Method Signature ```java public void visitHomePage() ``` ```custom fun visitHomePage() ``` #### Method Example ```java visitHomePage() ``` **visitHomePage(Map customParameters)** This method allows you to tag your Homepage as an event with custom parameters. You can call this method whenever a user visits your HomePage. This method tracks the homepage visit event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | customParameters | Map | Map of custom parameters to be added to the event. Can be null or empty. | **Return value**: void **Method signature** ```java public void visitHomePage(Map customParameters) ``` ```custom fun visitHomePage(customParameters: Map?) ``` **Method example** ```java Map customParams = new HashMap<>(); customParams.put("source", "demo"); customParams.put("campaign_id", "campaign_123"); customParams.put("page_number", 1); Insider.Instance.visitHomePage(customParams); ``` ```custom val customParams = mapOf( "source" to "demo", "campaign_id" to "campaign_123", "page_number" to 1 ) Insider.Instance.visitHomePage(customParams) ``` > Custom parameters are optional and can be **null** or **empty**. ### Listing Page View This method allows you to tag the visits on your listing page as an event. You can call this method each time a user visits your listing page along with the following event parameters: taxonomy, type, referrer, key, show_on_segment, is_pii, device_type, url, and source. | Parameter | Data Type | | --- | --- | | taxonomy | Array of string | This event will be ignored if you pass any nil/null or empty parameter to this method. #### Method Signature ```java public void visitListingPage(String[] taxonomy) ``` ```custom fun visitListingPage(String[] taxonomy) ``` #### Method Example ```java String[] taxonomy = {"taxonomy1", "taxonomy2", "taxonomy3"}; Insider.Instance.visitListingPage(taxonomy); ``` **visitListingPage(String[] taxonomy, Map customParameters)** This method allows you to tag your ListingPage as an event with custom parameters. You can call this method whenever a user visits the ListingPage. This method tracks the listing page visit event with the provided taxonomy and includes any custom parameters. | Parameter | Type | Description | | --- | --- | --- | | taxonomy | String[] | Taxonomy (category) of the product. | | customParameters | Map | Map of custom parameters to be added to the event. Can be null or empty. | **Return value**: void **Method signature** ```java public void visitListingPage(String[] taxonomy, Map customParameters) ``` ```custom fun visitListingPage(taxonomy: Array?, customParameters: Map?) ``` **Method example** ```java String[] taxonomy = {"Electronics", "Smartphones", "Samsung"}; Map customParams = new HashMap<>(); customParams.put("page_number", 1); customParams.put("sort_by", "price"); customParams.put("filter_applied", true); Insider.Instance.visitListingPage(taxonomy, customParams); ``` ```custom val taxonomy = arrayOf("Electronics", "Smartphones", "Samsung") val customParams = mapOf( "page_number" to 1, "sort_by" to "price", "filter_applied" to true ) Insider.Instance.visitListingPage(taxonomy, customParams) ``` > If any parameter that is passed to this method is **nil** or an **empty** string, it will be ignored. ### Product Detail Page View This method allows you to tag the visits on your product page as an event. You can call this method each time a user visits your product page along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. > This event is required for the [Social Proof](/docs/android-social-proof) method. | Parameter | Data Type | | --- | --- | | product | object ([Insider product object](/docs/android-product-object)) | This event requires the Insider [product](/docs/android-product-object) object to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void visitProductDetailPage(InsiderProduct product) ``` ```custom fun visitProductDetailPage(InsiderProduct product) ``` #### Method Example ```java Insider.Instance.visitProductDetailPage(insiderExampleProduct); ``` **visitProductDetailPage(InsiderProduct product, Map customParameters)** This method allows you to tag your ProductDetailPage as an event with custom parameters. You can call this method whenever a user visits your ProductDetailPage. This method tracks the product detail page visit event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | product | InsiderProduct | The InsiderProduct object | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void visitProductDetailPage(InsiderProduct product, Map customParameters) ``` ```custom fun visitProductDetailPage(product: InsiderProduct?, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", new String[]{"Electronics", "Smartphones"}, "https://example.com/image.jpg", 99.99, "USD" ); Map customParams = new HashMap<>(); customParams.put("source", "search"); customParams.put("campaign_id", "campaign_123"); customParams.put("recommendation_id", "rec_456"); Insider.Instance.visitProductDetailPage(product, customParams); ``` ```custom val product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", arrayOf("Electronics", "Smartphones"), "https://example.com/image.jpg", 99.99, "USD" ) val customParams = mapOf( "source" to "search", "campaign_id" to "campaign_123", "recommendation_id" to "rec_456" ) Insider.Instance.visitProductDetailPage(product, customParams) ``` > If you pass an **invalid** InsiderProduct object to this method, it will be ignored. ### Cart Page View This method allows you to tag the visits on your cart page as an event. You can call this method each time a user visits your cart page, along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. | Parameter | Data Type | | --- | --- | | insiderProduct | Array of [Insider product object](/docs/android-product-object) | | saleID | String | This event requires the Insider [product](/docs/android-product-object) object to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void visitCartPage(InsiderProduct[] products) ``` ```custom fun visitCartPage(InsiderProduct[] products) ``` #### Method Example ```java Insider.Instance.visitCartPage(insiderExampleProducts); ``` **visitCartPage(InsiderProduct[] products, Map customParameters)** This method allows you to tag your CartPage as an event with custom parameters. You can call this method whenever a user visits your CartPage, passing the products on the page. This method tracks the cart page visit event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | insiderProducts | InsiderProduct[] | The array of InsiderProduct objects | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void visitCartPage(InsiderProduct[] products, Map customParameters) ``` ```custom fun visitCartPage(products: Array?, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", new String[]{"Electronics", "Smartphones"}, "https://example.com/image.jpg", 99.99, "USD" ); InsiderProduct[] products = {product}; Map customParams = new HashMap<>(); customParams.put("cart_total", 99.99); customParams.put("item_count", 1); customParams.put("discount_applied", false); Insider.Instance.visitCartPage(products, customParams); ``` ```custom val product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", arrayOf("Electronics", "Smartphones"), "https://example.com/image.jpg", 99.99, "USD" ) val customParams = mapOf( "cart_total" to 99.99, "item_count" to 1, "discount_applied" to false ) Insider.Instance.visitCartPage(arrayOf(product), customParams) ``` > If you have any **invalid** InsiderProduct object inside the array, it will be **ignored.** **visitCartPageWithProducts:saleID** This method allows you to tag your CartPage as an event with sale ID. You can call this method each time a user visits the CartPage, passing the products on the page. This method tracks the cart page visit event and includes any custom parameters you provide. This method is available in SDK 15.3.0 and later. | Parameter | Type | Definition | | --- | --- | --- | | insiderProducts | InsiderProduct[] | The array of InsiderProduct objects | | saleID | String | The unique identifier of the remove operation | **Return value**: void **Method signature** ```java Insider.Instance.visitCartPage(InsiderProduct[] products, String saleID); ``` ```custom Insider.Instance.visitCartPage(products: Array, saleID: String) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "SKU-123", "Blue Shirt", new String[]{"Apparel"}, "https://example.com/image.jpg", 19.99, "USD"); Insider.Instance.visitCartPage(new InsiderProduct[]{product}, "TXN-456"); ``` ```custom val product = Insider.Instance.createNewProduct( "SKU-123", "Blue Shirt", arrayOf("Apparel"), "https://example.com/image.jpg", 19.99, "USD" ) Insider.Instance.visitCartPage(arrayOf(product), "TXN-456") ``` **visitCartPageWithProducts:saleID:customParameters** This method allows you to tag your CartPage as an event with sale ID and custom parameters. You can call this method each time a user visits the CartPage, passing the products on the page. This method tracks the cart page visit event and includes any custom parameters you provide. This method is available in SDK 15.3.0 and later. | Parameter | Type | Definition | | --- | --- | --- | | insiderProducts | InsiderProduct[] | The array of InsiderProduct objects | | saleID | String | The unique identifier of the remove operation | | customParameters | Map customParameters); ``` ```custom Insider.Instance.visitCartPage(products: Array, saleID: String, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "SKU-123", "Blue Shirt", new String[]{"Apparel"}, "https://example.com/image.jpg", 19.99, "USD"); Map customParameters = new HashMap<>(); customParameters.put("promo", "SUMMER20"); Insider.Instance.visitCartPage(new InsiderProduct[]{product}, "TXN-456", customParameters); ``` ```custom val product = Insider.Instance.createNewProduct( "SKU-123", "Blue Shirt", arrayOf("Apparel"), "https://example.com/image.jpg", 19.99, "USD" ) Insider.Instance.visitCartPage(arrayOf(product), "TXN-456", mapOf("promo" to "SUMMER20")) ``` ### Wishlist Page View This method allows you to tag the visits on your wishlist page as an event. You can call this method each time a user visits your wishlist page, along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. | Parameter | Data Type | | --- | --- | | insiderProduct | Array of [Insider product object](/docs/android-product-object) | This event requires the Insider [product](/docs/android-product-object) object to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void visitWishlistPage(InsiderProduct[] products) ``` ```custom fun visitWishlistPage(InsiderProduct[] products) ``` #### Method Example ```java Insider.Instance.visitWishlistPage(insiderExampleProducts); ``` **visitWishlistPage(InsiderProduct[] products, Map customParameters)** This method allows you to tag your Wishlist as an event with custom parameters. You can call this method each time a user visits your Wishlist, passing the products on the page. This method tracks the wishlist visit event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | insiderProducts | InsiderProduct[] | The array of InsiderProduct objects | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void visitWishlistPage(InsiderProduct[] products, Map customParameters) ``` ```custom fun visitWishlistPage(products: Array?, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", new String[]{"Electronics", "Smartphones"}, "https://example.com/image.jpg", 99.99, "USD" ); InsiderProduct[] products = {product}; Map customParams = new HashMap<>(); customParams.put("wishlist_total_items", 5); customParams.put("wishlist_total_value", 500.0); Insider.Instance.visitWishlistPage(products, customParams); ``` ```custom val product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", arrayOf("Electronics", "Smartphones"), "https://example.com/image.jpg", 99.99, "USD" ) val customParams = mapOf( "wishlist_total_items" to 5, "wishlist_total_value" to 500.0 ) Insider.Instance.visitWishlistPage(arrayOf(product), customParams) ``` > If you have any **invalid** InsiderProduct object inside the array, it will be **ignored.** ### Confirmation Page View (Purchase) This method allows you to tag the visits on your confirmation page as an event. You can call this method each time a user makes a purchase along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. > This event is required for the [Track Revenue](/docs/android-track-revenue) method. | Parameter | Data Type | | --- | --- | | saleID | String | | product | Object ([Insider product object](/docs/android-product-object)) | Call this event only on successful transactions completed with any payment method.This event requires the Insider [product](/docs/android-product-object) object to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void itemPurchased(String saleID, InsiderProduct product) ``` ```custom fun itemPurchased(String saleID, InsiderProduct product) ``` #### Method Example ```java Insider.Instance.itemPurchased("uniqueSaleID", insiderExampleProduct); ``` **itemPurchased(String saleID, InsiderProduct product, Map customParameters)** This method allows you to track your sales and revenue with custom parameters. This method tracks a purchase event when a user completes a purchase. It records the sale ID, product information, and any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | saleID | String | The saleID (transactionID) of the sale | | product | InsiderProduct | The InsiderProduct object | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void itemPurchased(String saleID, InsiderProduct product, Map customParameters) ``` ```custom fun itemPurchased(saleID: String?, product: InsiderProduct?, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", new String[]{"Electronics", "Smartphones"}, "https://example.com/image.jpg", 99.99, "USD" ); Map customParams = new HashMap<>(); customParams.put("payment_method", "credit_card"); customParams.put("discount_applied", true); customParams.put("shipping_method", "express"); Insider.Instance.itemPurchased("sale_123", product, customParams); ``` ```custom val product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", arrayOf("Electronics", "Smartphones"), "https://example.com/image.jpg", 99.99, "USD" ) val customParams = mapOf( "payment_method" to "credit_card", "discount_applied" to true, "shipping_method" to "express" ) Insider.Instance.itemPurchased("sale_123", product, customParams) ``` > If you pass an **invalid** InsiderProduct object to this method, it will be ignored. This method validates that **saleID** is not empty before processing. ### Sign Up Confirmation This method lets you tag visits on your sign-up confirmation page as an event. You can call this method each time a user signs up to your application. #### Method Signature ```java public void signUpConfirmation() ``` ```custom fun signUpConfirmation() ``` #### Method Example ```java Insider.Instance.signUpConfirmation(); ``` --- ## Cart events You should trigger the cart events when a user takes the action for the respective type of cart move in the application. The default cart events include the Item Added to Cart, Item Removed from Cart, and Cart Cleared. See below for their method signatures and examples. If you want to trigger any other cart-related event, define a custom event inĀ [Test Lab](https://academy.insiderone.com/docs/creating-events-and-attributes-for-test-lab). ### Item Added to Cart (Add to Cart) You can call this method whenever a user adds a product ([Insider product object](/docs/android-product-object)) to their cart, along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. > This event is required for the [Cart Reminder](/docs/android-cart-reminder) method. | Parameter | Data Type | | --- | --- | | product | Object ([Insider product object](/docs/android-product-object)) | This event requires the Insider [product](/docs/android-product-object) object to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void itemAddedToCart(InsiderProduct product) ``` ```custom fun itemAddedToCart(InsiderProduct product) ``` #### Method Example ```java Insider.itemAddedToCart(with: insiderExampleProduct) ``` **itemAddedToCart(InsiderProduct product, Map customParameters)** This method allows you to add an item to your cart with custom parameters. Call this method each time the user adds a product to their cart. This method tracks the add-to-cart event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | product | InsiderProduct | The InsiderProduct object | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void itemAddedToCart(InsiderProduct product, Map customParameters) ``` ```custom fun itemAddedToCart(product: InsiderProduct?, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", new String[]{"Electronics", "Smartphones"}, "https://example.com/image.jpg", 99.99, "USD" ); Map customParams = new HashMap<>(); customParams.put("quantity", 2); customParams.put("source", "recommendation"); customParams.put("variant_id", "variant_123"); Insider.Instance.itemAddedToCart(product, customParams); ``` ```custom val product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", arrayOf("Electronics", "Smartphones"), "https://example.com/image.jpg", 99.99, "USD" ) val customParams = mapOf( "quantity" to 2, "source" to "recommendation", "variant_id" to "variant_123" ) Insider.Instance.itemAddedToCart(product, customParams) ``` > If you pass an **invalid** InsiderProduct object to this method, it will be ignored. ### Item Removed from Cart You can call this method whenever a user removes a product ([Insider product object](/docs/android-product-object)) from their cart, along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. > This event is required for the [Cart Reminder](/docs/android-cart-reminder) method. | Parameter | Data Type | | --- | --- | | productID | String | This event requires the Insider [product](/docs/android-product-object) object to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void itemRemovedFromCart(String productID) ``` ```custom fun itemRemovedFromCart(String productID) ``` #### Method Example ```java Insider.Instance.itemRemovedFromCart("productID"); ``` **itemRemovedFromCart(String productID, Map customParameters)** This method removes an item from the cart with custom parameters. Call this method each time the user removes a product from their cart. This method tracks the remove-from-cart event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | productID | String | The identifier of the product that is being removed from the cart | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void itemRemovedFromCart(String productID, Map customParameters) ``` ```custom fun itemRemovedFromCart(productID: String?, customParameters: Map?) ``` **Method example** ```java Map customParams = new HashMap<>(); customParams.put("reason", "out_of_stock"); customParams.put("cart_total_after", 0.0); Insider.Instance.itemRemovedFromCart("demo_product_123", customParams); ``` ```custom val customParams = mapOf( "reason" to "out_of_stock", "cart_total_after" to 0.0 ) Insider.Instance.itemRemovedFromCart("demo_product_123", customParams) ``` **itemRemovedFromCartWithProductID:saleID** This method removes an item from the cart with sale ID. Call this method each time the user removes a product from their cart. The method tracks the **remove-from-cart** event and includes any custom parameters you provide. This method is available in SDK 15.3.0 and later. | Parameter | Type | Description | | --- | --- | --- | | productID | String | The identifier of the product that is being removed from the cart | | saleID | String | The unique identifier of the remove operation | **Return value**: void **Method signature** ```java Insider.Instance.itemRemovedFromCart(String productID, String saleID); ``` ```custom Insider.Instance.itemRemovedFromCart(productID: String, saleID: String) ``` **Method example** ```java Insider.Instance.itemRemovedFromCart("SKU-123", "TXN-456"); ``` ```custom Insider.Instance.itemRemovedFromCart("SKU-123", "TXN-456") ``` **itemRemovedFromCartWithProductID:saleID:customParameters** This method removes an item from the cart with sale ID and custom parameters. Call this method each time the user removes a product from their cart. The method tracks the remove-from-cart event and includes any custom parameters you provide. This method is available in SDK 15.3.0 and later. | Parameter | Type | Definition | | --- | --- | --- | | productID | String | The identifier of the product that is being removed from the cart | | saleID | String | The unique identifier of the remove operation | | customParameters | Map customParameters); ``` ```custom Insider.Instance.itemRemovedFromCart(productID: String, saleID: String, customParameters: Map?) ``` **Method example** ```java Insider.Instance.itemRemovedFromCart("SKU-123", "TXN-456", new HashMap() {{ put("source", "wishlist"); }}); ``` ```custom Insider.Instance.itemRemovedFromCart("SKU-123", "TXN-456", mapOf("source" to "wishlist")) ``` ### Cart Cleared You can call this method whenever a user removes all products from their cart or when the last [Insider product object](/docs/android-product-object) is removed from the cart. > This event is required for the [Cart Reminder](/docs/android-cart-reminder) method. Consider all cases and methods a user can use to empty their cart. #### Method Signature ```java public void cartCleared() ``` ```custom fun cartCleared() ``` #### Method Example ```java Insider.Instance.cartCleared(); ``` **cartCleared(Map customParameters)** This method clears all the items in the cart with custom parameters. Call this method when the user clears the cart or when the last item in the cart has been removed. This method tracks the cart cleared event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void cartCleared(Map customParameters) ``` ```custom fun cartCleared(customParameters: Map?) ``` **Method example** ```java Map customParams = new HashMap<>(); customParams.put("items_count_before", 3); customParams.put("total_value_before", 150.0); customParams.put("reason", "user_action"); Insider.Instance.cartCleared(customParams); ``` ```custom val customParams = mapOf( "items_count_before" to 3, "total_value_before" to 150.0, "reason" to "user_action" ) Insider.Instance.cartCleared(customParams) ``` ## Wishlist events You should trigger wishlist events when a user takes the corresponding action for the respective type of wishlist move in the application. The default wishlist events include the Item Added to Wishlist, Item Removed from Wishlist, and Wishlist Cleared. See below for their method signatures and examples. If you want to trigger any other wishlist-related event, you should define a custom event on the [Test Lab](https://academy.insiderone.com/docs/creating-events-and-attributes-for-test-lab). ### Item Added to Wishlist (Add to Wishlist) You can call this method whenever a user adds a product ([Insider product object](https://academy.insiderone.com/docs/android-product-object)) to their wishlist, along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. | Parameter | Data Type | | --- | --- | | product | Object ([Insider product object](https://academy.useinsider.com/docs/android-product-object)) | This event requires the [Insider product object](https://academy.useinsider.com/docs/android-product-object) to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void itemAddedToWishlist(InsiderProduct product) ``` ```custom fun itemAddedToWishlist(InsiderProduct product) ``` #### Method Example ```java Insider.Instance.itemAddedToWishlist(insiderExampleProduct); ``` **itemAddedToWishlist(InsiderProduct product, Map customParameters)** This method allows you to add an item to your wishlist with custom parameters. Call this method each time the user adds a product to their wishlist. This method tracks the add-to-wishlist event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | product | InsiderProduct | The InsiderProduct object | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void itemAddedToWishlist(InsiderProduct product, Map customParameters) ``` ```custom fun itemAddedToWishlist(product: InsiderProduct?, customParameters: Map?) ``` **Method example** ```java InsiderProduct product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", new String[]{"Electronics", "Smartphones"}, "https://example.com/image.jpg", 99.99, "USD" ); Map customParams = new HashMap<>(); customParams.put("source", "product_page"); customParams.put("recommendation_id", "rec_123"); customParams.put("wishlist_size", 5); Insider.Instance.itemAddedToWishlist(product, customParams); ``` ```custom val product = Insider.Instance.createNewProduct( "demo_product_123", "Demo Product", arrayOf("Electronics", "Smartphones"), "https://example.com/image.jpg", 99.99, "USD" ) val customParams = mapOf( "source" to "product_page", "recommendation_id" to "rec_123", "wishlist_size" to 5 ) Insider.Instance.itemAddedToWishlist(product, customParams) ``` > If you pass an **invalid** InsiderProduct object to this method, it will be ignored. ### Item Removed from Wishlist You can call this method whenever a user removes a product ([Insider product object](https://academy.useinsider.com/docs/android-product-object)) from their wishlist, along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency. | Parameter | Data Type | | --- | --- | | productID | String | This event requires the [Insider product object](https://academy.useinsider.com/docs/android-product-object) to be integrated beforehand, along with its product ID, name, taxonomy, image URL, price, and currency attributes. #### Method Signature ```java public void itemRemovedFromWishlist(String productID) ``` ```custom fun itemRemovedFromWishlist(String productID) ``` #### Method Example ```java Insider.Instance.itemRemovedFromWishlist("productID"); ``` **itemRemovedFromWishlist(String productID, Map customParameters)** This method removes an item from the wishlist with custom parameters. Call this method each time the user removes a product from their wishlist. This method tracks the remove-from-wishlist event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | productID | String | The identifier of the product that is being removed from the wishlist. | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void itemRemovedFromWishlist(String productID, Map customParameters) ``` ```custom fun itemRemovedFromWishlist(productID: String?, customParameters: Map?) ``` **Method example** ```java Map customParams = new HashMap<>(); customParams.put("reason", "purchased"); customParams.put("wishlist_size_after", 4); Insider.Instance.itemRemovedFromWishlist("demo_product_123", customParams); ``` ```custom val customParams = mapOf( "reason" to "purchased", "wishlist_size_after" to 4 ) Insider.Instance.itemRemovedFromWishlist("demo_product_123", customParams) ``` ### Wishlist Cleared You can call this method whenever a user removes all products from their wishlist or when the last [Insider product object](https://academy.useinsider.com/docs/android-product-object) is removed from the wishlist. Consider all cases and methods a user can use to empty their wishlist. #### Method Signature ```java public void wishlistCleared() ``` ```custom fun wishlistCleared() ``` #### Method Example ```java Insider.Instance.wishlistCleared(); ``` **wishlistCleared(Map customParameters)** This method clears all the items in the wishlist with custom parameters. Call this method when the user clears the wishlist or when the last item in it is removed. The method tracks the wishlist cleared event and includes any custom parameters you provide. | Parameter | Type | Description | | --- | --- | --- | | customParameters | Map | Map of custom parameters to be added to the event. Can be **null** or **empty**. | **Return value**: void **Method signature** ```java public void wishlistCleared(Map customParameters) ``` ```custom fun wishlistCleared(customParameters: Map?) ``` **Method example** ```java Map customParams = new HashMap<>(); customParams.put("items_count_before", 10); customParams.put("reason", "user_action"); Insider.Instance.wishlistCleared(customParams); ``` ```custom val customParams = mapOf( "items_count_before" to 10, "reason" to "user_action" ) Insider.Instance.wishlistCleared(customParams) ```