Skip to main content
SDK Version

Advanced

The following guides cover advanced features and customization options available in the Actito SDK.

These topics are optional and can be adopted selectively based on your application’s requirements. You can safely skip any sections that are not relevant to your use case or implementation strategy.

In-App Message Lifecycle

When using the In-App Messaging module, you can listen to a series of lifecycle events emitted throughout the message presentation and action execution process. In more advanced implementations, these events can be leveraged to perform additional logic — such as tracking analytics, updating application state, or triggering custom navigation behaviors.

Message presentation events

These methods notify you of each stage in an in-app message’s presentation lifecycle:

  • onMessagePresented: Called immediately after the message is displayed.
import { onMessagePresented } from 'actito-web/in-app-messaging'

onMessagePresented((message) => {
console.log(`Presented message: ${message.id}`)
});
  • onMessageFinishedPresenting: Called when the in-app message has been dismissed or closed.
import { onMessageFinishedPresenting } from 'actito-web/in-app-messaging'

onMessageFinishedPresenting((message) => {
console.log(`Message finished presenting: ${message.id}`)
});
  • onMessageFailedToPresent: Called if an error occurs during presentation.
import { onMessageFailedToPresent } from 'actito-web/in-app-messaging'

onMessageFailedToPresent((message) => {
console.error(`Failed to present message: ${message.id}`)
});

Action execution events

These methods notify you of each stage in an action’s execution lifecycle:

  • onActionExecuted: Called when the action has been successfully performed.
import { onActionExecuted } from 'actito-web/in-app-messaging'

onActionExecuted((message) => {
console.log(`Executed action for message: ${message.id}`)
});
  • onActionFailedToExecute: Called when the SDK attempted to execute the action but encountered an error.
import { onActionFailedToExecute } from 'actito-web/in-app-messaging'

onActionFailedToExecute((message) => {
console.error(`Action failed to execute for message: ${message.id}`)
});