AnalyticsLogger

A singleton object responsible for handling analytics logging throughout the Airwallex SDK. Provides methods to log various types of events including page views, errors, API errors, actions, and payment views.

Functions

Link copied to clipboard
fun initialize(context: Context)

Initializes the analytics tracker with the provided context.

Link copied to clipboard
fun logAction(actionName: String, additionalInfo: Map<String, Any>? = null)

Logs a user action event.

Link copied to clipboard
fun logApiError(eventName: String, url: String, exception: AirwallexException)

Logs an API error event.

Link copied to clipboard
fun logError(eventName: String, additionalInfo: Map<String, Any>)

Logs a generic error event.

fun logError(eventName: String, exception: AirwallexException, additionalInfo: Map<String, Any>? = null)

Logs an error event with exception details.

Link copied to clipboard
fun logPageView(pageName: String, additionalInfo: Map<String, Any>? = null)

Logs a page view event.

Link copied to clipboard
fun logPaymentView(viewName: String, additionalInfo: Map<String, Any>? = null)

Logs a payment method view event.

Link copied to clipboard
fun setSessionInformation(transactionMode: String, paymentIntentId: String? = null)

Sets the current session information.

Link copied to clipboard
fun updateAccountId(accountId: String?)

Updates the account ID in the analytics tracker.