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

Prev Next

Below, you can see a list of default mobile events along with their method signatures and examples:

Your title goes here
While SDK events are automatically triggered by Insider, the other event types need to be implemented via their methods by partners.

SDK events

Session events are automatically triggered based on user actions on the application and campaigns and do not require any configuration from the customer's end.

EventHow does it work?
Mobile App OpenedTriggered when the app is opened
Session StartTriggered every time a session starts
Session Start From PushTriggered if a session starts upon a click on a push notification. Test pushes do not trigger this event.
Push SessionTriggered if a session starts upon a click on a push notification. Test pushes do not trigger this event.
Push DeliveredTriggered when a push is delivered
App Push OpenedTriggered when an app push is opened
InApp SeenTriggered when an inApp is seen along with the inApp ID and variant ID information
Mobile Social Proof SeenTriggered when a social proof is seen

Page visit events

You should trigger the page visit events when a user visits the respective type of page 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.

Your title goes here
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.

Homepage View

This method allows you to tag the visits on your homepage as an event. You can call this method each time a user visits your homepage.

Method Signature

Future visitHomePage() async

Method Example

FlutterInsider.Instance.visitHomePage();

visitHomePage({Map<String, Object>? customParameters})

This method allows you to tag your Homepage as an event with custom parameters. You can call this method each time the user visits your homepage. The method tracks the homepage visit event and includes any custom parameters you provide.

ParameterTypeDescription
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

 Future<void> visitHomePage({Map<String, Object>? customParameters})

Method example

 final customParams = {
    "source": "demo",
    "campaign_id": "campaign_123",
    "page_number": 1,
  };
  await FlutterInsider.Instance.visitHomePage(customParameters: customParams);

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.

ParameterData Type
taxonomyArray of string
Your title goes here
If you pass any nil/null or empty parameter to this method, this event will be ignored.

Method Signature

Future<void> visitListingPage(List<String> taxonomy) async

Method Example

List<String> taxonomy = new List(3);
    taxonomy[0] = "TAX1";
    taxonomy[1] = "TAX2";
    taxonomy[2] = "TAX3";
FlutterInsider.Instance.visitListingPage(taxonomy);

 visitListingPage(List<String> taxonomy, {Map<String, Object>? customParameters})

This method allows you to tag your ListingPage as an event with custom parameters. You can call this method each time the listing page is visited by the user. The method tracks the listing page visit event with the provided taxonomy and includes any custom parameters.

ParameterTypeDescription
taxonomyList<String>Taxonomy (category) of the product.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

 Future<void> visitListingPage(List<String> taxonomy, {Map<String, Object>? customParameters})

Method example

 final customParams = {
    "filter_applied": "brand",
    "sort_order": "price_asc",
  };
  
  await FlutterInsider.Instance.visitListingPage(
    ["Electronics", "Phones"],
    customParameters: customParams,
  );
If any parameter that is passed to this method is nil or an emptystring, 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 method.

ParameterData Type
productobject (Insider product object)
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

Future visitProductDetailPage(FlutterInsiderProduct product) async

Method Example

FlutterInsider.Instance.visitProductDetailPage(insiderExampleProduct);

visitProductDetailPage(FlutterInsiderProduct product, {Map<String, Object>? customParameters})

This method allows you to tag your ProductDetailPage as an event with custom parameters. You can call this method each time the user visits your ProductDetailPage. The method tracks the product detail page visit event and includes any custom parameters you provide.

ParameterTypeDescription
productFlutterInsiderProductThe InsiderProduct object
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

  Future<void> visitProductDetailPage(FlutterInsiderProduct product, {Map<String, Object>? customParameters})

Method example

 final product = FlutterInsider.Instance.createNewProduct(
    "product_123", "Awesome Product", ["Electronics"], "https://example.com/img.jpg", 99.99, "USD"
  );
  
  final customParams = {
    "referrer": "search_results",
    "position": 3,
  };
  
  await FlutterInsider.Instance.visitProductDetailPage(product, customParameters: 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.

ParameterData Type
productsList<FlutterInsiderProduct>
saleIDString?
customParametersMap<String, Object>?
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

Future<void> visitCartPage(List<FlutterInsiderProduct> products, { String? saleID, Map<String, Object>? customParameters }) async

Method Example

final products = <FlutterInsiderProduct>[
 FlutterInsider.Instance.createNewProduct('sku_001', 'Product Name 1', ['Accessories', 'Phone Cases'], 'https://insiderone.com/product_image_1.jpg', 29.99, 'USD'),
 FlutterInsider.Instance.createNewProduct('sku_002', 'Product Name 2', ['Accessories', 'Screen Protection'], 'https://insiderone.com/product_image_2.jpg', 14.99, 'USD')
];
await Insider.Instance.visitCartPage(
  products,
  saleID: 'cart_12345',
  customParameters: {
    'cart_source': 'mobile_app',
    'is_first_checkout': true,
    'item_count': products.length
  },
);

visitCartPage(List<FlutterInsiderProduct> products, {String? saleID, Map<String, Object>? customParameters})

This method allows you to tag your CartPage as an event with custom parameters. You can call this method each time the user visits your CartPage, passing the products on the page. The method tracks the cart page visit event and includes any custom parameters you provide.

ParameterTypeDescription
productsList<FlutterInsiderProduct>The array of InsiderProduct objects.
saleIDString?Optional sale/campaign ID. Can be null or empty.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> visitCartPage(List<FlutterInsiderProduct> products, {String? saleID, Map<String, Object>? customParameters})

Method example

 final customParams = {
    "cart_value": 199.99,
    "promo_applied": true,
  };
  
  await FlutterInsider.Instance.visitCartPage(
    products,
    saleID: "SUMMER25",
    customParameters: customParams,
  );

If you have any invalid InsiderProduct object inside the array, it will be ignored.

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.

ParameterData Type
insiderProductArray of Insider product object
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

void visitWishlistPage(List<FlutterInsiderProduct> products)

Method Example

FlutterInsider.Instance.visitWishlistPage(insiderExampleProducts);

 visitWishlistPage(List<FlutterInsiderProduct> products, {Map<String, Object>? customParameters})

This method allows you to tag your Wishlist as an event with custom parameters. You can call this method each time the user visits your Wishlist, passing the products on the page. The method tracks the wishlist visit event and includes any custom parameters you provide.

ParameterTypeDescription
productsList<FlutterInsiderProduct>The list of InsiderProduct objects.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> visitWishlistPage(List<FlutterInsiderProduct> products, {Map<String, Object>? customParameters})

Method example

 final customParams = {
    "wishlist_size": 5,
  };
  
  await FlutterInsider.Instance.visitWishlistPage(products, customParameters: 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 method.

ParameterData Type
saleIDString
productObject (Insider product object)
Your title goes here
Make sure to call this event only on successful transactions that are completed with any payment method.
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

Future itemPurchased(String uniqueSaleID, FlutterInsiderProduct product) async

Method Example

FlutterInsider.Instance.itemPurchased("uniqueSaleID", insiderExampleProduct);

 itemPurchased(String uniqueSaleID, FlutterInsiderProduct product, {Map<String, Object>? 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.

ParameterTypeDescription
uniqueSaleIDStringThe saleID(transactionID) of the sale.
productFlutterInsiderProductThe InsiderProduct object.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> itemPurchased(String uniqueSaleID, FlutterInsiderProduct product, {Map<String, Object>? customParameters})

Method example

 final customParams = {
    "payment_method": "credit_card",
    "coupon_used": "SAVE10",
  };
  await FlutterInsider.Instance.itemPurchased(
    "sale_456",
    product,
    customParameters: customParams,
  );

If you pass an invalid InsiderProduct object to this method, it will be ignored.

Sign Up Confirmation

This method allows you to tag the 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

Future signUpConfirmation() async

Method Example

FlutterInsider.Instance.signUpConfirmation()

Cart events

You should trigger the page visit events when a user visits the respective type of page 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.

Your title goes here
If you want to trigger any other cart-related event, you should define a custom event on the Test Lab.

Item Added to Cart (Add to Cart)

You can call this method whenever a user adds a product (Insider 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 method.

ParameterData Type
productObject (Insider product object)
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

Future itemAddedToCart(FlutterInsiderProduct product) async

Method Example

FlutterInsider.Instance.itemAddedToCart(insiderExampleProduct);

 itemAddedToCart(FlutterInsiderProduct product, {Map<String, Object>? 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. The method tracks the add-to-cart event and includes any custom parameters you provide.

ParameterTypeDescription
productFlutterInsiderProductThe InsiderProduct object.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> itemAddedToCart(FlutterInsiderProduct product, {Map<String, Object>? customParameters})

Method example

 final customParams = {
    "add_source": "product_detail",
    "quantity": 2,
  };
  
  await FlutterInsider.Instance.itemAddedToCart(product, customParameters: 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) 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 method.

ParameterData Type
productIDString
saleIDString?
customParametersMap<String, Object>?
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

Future<void> itemRemovedFromCart(String productID, { String? saleID, Map<String, Object>? customParameters }) async

Method Example

await Insider.Instance.itemRemovedFromCart(
  'sku_001',
  saleID: 'cart_12345',
  customParameters: {
    'removed_from': 'cart_screen',
    'removal_reason': 'user_deleted',
    'remaining_item_count': 2,
    'was_last_item': false,
  },
);

 itemRemovedFromCart(String productID, {String? saleID, Map<String, Object>? 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. The method tracks the remove-from-cart event and includes any custom parameters you provide.

ParameterTypeDescription
productIDStringThe identifier of the product that is being removed from the cart.
saleIDString?Optional sale/campaign ID. Can be null or empty.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> itemRemovedFromCart(String productID, {String? saleID, Map<String, Object>? customParameters})

Method example

 final customParams = {
    "remove_reason": "price",
  };
  
  await FlutterInsider.Instance.itemRemovedFromCart(
    "product_123",
    customParameters: customParams,
  );

Cart Cleared

You can call this method whenever a user removes all products from their cart or when the last Insider product object is removed from the cart.

This event is required for the Cart Reminder method.

Your title goes here
Make sure to consider all cases and methods a user can empty their cart.

Method Signature

Future cartCleared() async

Method Example

FlutterInsider.Instance.cartCleared();

 cartCleared({Map<String, Object>? 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. The method tracks the cart cleared event and includes any custom parameters you provide.

ParameterTypeDescription
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

  Future<void> cartCleared({Map<String, Object>? customParameters})

Method example

 final customParams = {
    "trigger": "user_action",
  };
  
  await FlutterInsider.Instance.cartCleared(customParameters: customParams);

Wishlist Events

You should trigger the wishlist events when a user takes the action for the respective type of wishlist moves 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.

Your title goes here
If you want to trigger any other wishlist-related event, you should define a custom event on the Test Lab.

Item Added to Wishlist (Add to Wishlist)

You can call this method whenever a user adds a product (Insider product object) to their wishlist along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency.

ParameterData Type
productObject (Insider product object)
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

void itemAddedToWishlist(FlutterInsiderProduct product)

Method Example

FlutterInsider.Instance.itemAddedToWishlist(insiderExampleProduct);

 itemAddedToWishlist(FlutterInsiderProduct product, {Map<String, Object>? 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. The method tracks the add-to-wishlist event and includes any custom parameters you provide.

ParameterTypeDescription
productFlutterInsiderProductThe InsiderProduct object.
customParametersMap<String, Object>?Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> itemAddedToWishlist(FlutterInsiderProduct product, {Map<String, Object>? customParameters})

Method example

 final customParams = {
    "add_source": "search",
  };
  
  await FlutterInsider.Instance.itemAddedToWishlist(product, customParameters: 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) from their wishlist along with the following event parameters: product ID, name, taxonomy, imageURL, price, and currency.

ParameterData Type
productIDString
Your title goes here
This event requires the Insider product object to be integrated beforehand along with its product ID, name, taxonomy, image URL, price, and currency attributes.

Method Signature

void itemRemovedFromWishlist(String productID)

Method Example

FlutterInsider.Instance.itemRemovedFromWishlist(productID);

 itemRemovedFromWishlist(String productID, {Map<String, Object>? 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. The method tracks the remove-from-wishlist event and includes any custom parameters you provide.

ParameterTypeDescription
productIDStringThe identifier of the product that is being removed from the wishlist.
customParametersMap<String, Object>?
Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> itemRemovedFromWishlist(String productID, {Map<String, Object>? customParameters})

Method example

 final customParams = {
    "remove_reason": "purchased",
  };
  await FlutterInsider.Instance.itemRemovedFromWishlist(
    "product_123",
    customParameters: customParams,
  );

Wishlist Cleared

You can call this method whenever a user removes all products from their wishlist or when the last Insider product object is removed from the wishlist.

Your title goes here
Make sure to consider all cases and methods a user can empty their wishlist.

Method Signature

void wishlistCleared()

Method Example

FlutterInsider.Instance.wishlistCleared();

wishlistCleared({Map<String, Object>? 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 the wishlist has been removed. The method tracks the wishlist cleared event and includes any custom parameters you provide.

ParameterTypeDescription
customParametersMap<String, Object>?
Map of custom parameters to be added to the event. Can be null or empty.

Return value: Future<void>

Method signature

Future<void> wishlistCleared({Map<String, Object>? customParameters})

Method example

 final customParams = {
    "trigger": "user_action",
  };
  
  await FlutterInsider.Instance.wishlistCleared(customParameters: customParams);