{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition"]},"type":"markdown"},"seo":{"title":"Analytics","description":"Transform your commerce with PXP's unified platform—seamless payments, real-time insights, and global growth in one powerful integration.","lang":"en-UK","siteUrl":"https://developer.pxp.io","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"analytics","__idx":0},"children":["Analytics"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Track Aeropay interactions, bank linking, errors, and transaction lifecycle events."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Android SDK emits structured analytics events throughout the Aeropay flow. Use these events to measure conversion, identify drop-off points, and connect client activity with your monitoring and analytics systems."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aeropay analytics can help you:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Measure progression from the payment button to transaction submission."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Track Aerosync bank-linking attempts and outcomes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Monitor consumer data, OTP, bank selection, and transaction errors."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Correlate client activity with sessions and merchant transactions."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Find points where shoppers abandon or repeatedly retry the flow."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"consume-analytics-events","__idx":2},"children":["Consume analytics events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["analyticsEvent"]}," when building ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val sdkConfig = PxpSdkConfig(\n    environment = Environment.TEST,\n    session = sessionResult.session,\n    transactionData = transactionData,\n    clientId = \"your-client-id\",\n    ownerType = \"MerchantGroup\",\n    ownerId = \"MERCHANT_GROUP_1\",\n    onGetShopper = { getCurrentShopper() },\n    analyticsEvent = { event ->\n        sendAnalyticsEvent(\n            eventName = event.eventName,\n            timestamp = event.timestamp,\n            payload = event,\n        )\n    },\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK calls this handler when an event is created. Keep the handler non-blocking and catch errors in your analytics client so tracking doesn't interrupt checkout."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Don't use analytics events to confirm payments or payouts. Verify the transaction on your backend using the authoritative PXP transaction result."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-events","__idx":3},"children":["Supported events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aeropay emits payment-method-specific events and shared component events."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All events include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]}," (milliseconds since epoch). Authorisation events also expose ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isRetry"]}," (defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"aeropay-specific-events","__idx":4},"children":["Aeropay-specific events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following events describe the embedded Aerosync bank-linking flow:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event name"},"children":["Event name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Trigger"},"children":["Trigger"]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"24%","data-label":"Fields returned"},"children":["Fields returned "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncLaunched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Aerosync bank-linking widget opens."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncCompleted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aerosync bank linking completes successfully."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aerosync bank linking fails."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Widget-level Aerosync failures emit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncFailed"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1304"]},". They don't always emit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]},". Listen for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncFailed"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," in addition to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]}," for complete Aeropay error coverage."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authorisation-events","__idx":5},"children":["Authorisation events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PreAuthorisation"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PostAuthorisation"]}," describe the transaction gate and successful submission:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event name"},"children":["Event name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Trigger"},"children":["Trigger"]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"24%","data-label":"Fields returned"},"children":["Fields returned "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PreAuthorisation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," is configured on the Aeropay component. The event fires at the start of payment submission, before the callback result is evaluated. It's emitted even when the callback returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropay"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionId"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PostAuthorisation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is configured and invoked after successful submission."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropay"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionId"]}]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionId"]}," is the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantTransactionId"]}," supplied during SDK initialisation. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PreAuthorisation"]}," is emitted only when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," is configured (including when the callback later returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"). ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PostAuthorisation"]}," is emitted only when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is configured and submission succeeds with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MerchantSubmitResult"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"component-interaction","__idx":6},"children":["Component interaction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentInteraction"]}," records shopper activity such as button taps and popup close actions:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentInteraction"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The current checkout session identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Aeropay area that produced the interaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["interactionType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The interaction, such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Click"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Close"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Submit"]},", or on data-entry screens ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Focus"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Blur"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Change"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The component identifier for the active control or screen."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aeropay uses these component types to identify parts of the flow:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Component type"},"children":["Component type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Area"},"children":["Area"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropay-button"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Main Aeropay payment button."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayDataCollection"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Consumer data collection screen."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayOtpVerification"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OTP verification screen."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayAerosync"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bank selection and Aerosync screen."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"component-lifecycle","__idx":7},"children":["Component lifecycle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentLifecycleEvent"]}," records popup screen mount and unmount activity:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentLifecycleEvent"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current checkout session identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Mount"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Unmount"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifier for the mounted control or screen element."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"component-errors","__idx":8},"children":["Component errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]}," records SDK and provider failures:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The current checkout session identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Component identifier for the failing control or screen. Always present; may be an empty string in edge cases."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK error code string. Always present; may be empty when no code is mapped."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorMessage"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A description of the error."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}," when investigating errors. Don't display ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorMessage"]}," directly to shoppers without mapping it to an approved user-facing message."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mapped failed Unity transaction responses call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]}," and also emit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1326"]},". Network or transport failures still call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]},", but can emit a different ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]}," code. Widget-level Aerosync failures that emit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncFailed"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1304"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," don't always emit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentError"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-messages-shown","__idx":9},"children":["Error messages shown"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorMessageShown"]}," records messages rendered inside the Aeropay flow. The event can represent field validation, user creation, OTP, bank account, account-linking, or transaction feedback shown in the popup. It isn't emitted merely because an error occurred."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK emits ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MessageShownAnalyticsEvent"]}," with these fields:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorMessageShown"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current checkout session identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aeropay screen area (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayDataCollection"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayOtpVerification"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayAerosync"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifier for the control that displayed the message."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messageContent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User-visible message text (treat as potentially sensitive)."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"track-a-conversion-funnel","__idx":10},"children":["Track a conversion funnel"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["interactionType"]}," to derive a basic Aeropay funnel:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"analyticsEvent = { event ->\n    when (event.eventName) {\n        \"ComponentInteraction\" -> {\n            val interaction = event as ComponentInteractionAnalyticsEvent\n            if (\n                interaction.componentType == \"aeropay-button\" &&\n                interaction.interactionType == \"Click\"\n            ) {\n                // Track aeropay_button_clicked\n            }\n        }\n        \"AerosyncLaunched\" -> {\n            // Track aeropay_bank_linking_started\n        }\n        \"AerosyncCompleted\" -> {\n            // Track aeropay_bank_linking_completed\n        }\n        \"PostAuthorisation\" -> {\n            // Track aeropay_transaction_submitted using transactionId\n        }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Filter the Aeropay button click carefully. Popup screens also emit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentInteraction"]}," events with the screen ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]}," values in the component-type table (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayDataCollection"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayOtpVerification"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aeropayAerosync"]},") and interaction types such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Focus"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Blur"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Change"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Submit"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Close"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PostAuthorisation"]}," is emitted only when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is set on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AeropayButtonComponentConfig"]}," and submission succeeds with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MerchantSubmitResult"]},". Configure that callback if you rely on this funnel stage."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Analytics events don't include a dedicated user-verification-success event. If you need that funnel stage, record a custom event from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserVerificationSuccess"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"privacy-guidance","__idx":11},"children":["Privacy guidance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When forwarding Aeropay analytics:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Prefer ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantTransactionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Don't forward OTPs, full shopper records, bank account numbers, or provider payloads."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorMessage"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messageContent"]}," as potentially sensitive."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Keep analytics out of the payment-confirmation path."]}]}]},"headings":[{"value":"Analytics","id":"analytics","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Consume analytics events","id":"consume-analytics-events","depth":2},{"value":"Supported events","id":"supported-events","depth":2},{"value":"Aeropay-specific events","id":"aeropay-specific-events","depth":3},{"value":"Authorisation events","id":"authorisation-events","depth":3},{"value":"Component interaction","id":"component-interaction","depth":3},{"value":"Component lifecycle","id":"component-lifecycle","depth":3},{"value":"Component errors","id":"component-errors","depth":3},{"value":"Error messages shown","id":"error-messages-shown","depth":3},{"value":"Track a conversion funnel","id":"track-a-conversion-funnel","depth":2},{"value":"Privacy guidance","id":"privacy-guidance","depth":2}],"frontmatter":{"seo":{"title":"Analytics"}},"lastModified":"2026-08-13T10:57:11.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/aeropay/analytics","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}