Overview
You can track user behavior in Link by including theonUIEvent callback in your Link initialization.
The onUIEvent callback is triggered for specific UI events in Link, and although optional, including this callback can help with troubleshooting as well as optimizing conversion rates.
Callbacks are not designed to be a primary source of analytics information. For detailed metrics on step-by-step conversion success rates, visit the Conversion area of Console’s Dashboard or contact your customer success manager.
Callback format
Add the line below to your Link initialization:- Web
- iOS
- Android
- React Native
- Flutter
Callback payload
TheonUIEvent callback returns:
- The
nameof the UI-related Event that triggered the callback. - A
propertiesobject, which can include:deepLink(always) — Whether the user was directly connected to the Item.userId(always) — ID of the user.accountId(conditional) — ID of the user’s account.itemId(conditional) — ID of the relevant Item.- Event-specific properties (conditional) — See Events below.
Example:
Events
Intro screen

Search screen

Property definitions:
term— The text entered in the search field.tab— The tab that was open when the user entered a search term or selected an Item. Ignored for empty (or deleted) search terms. Possible values:Popular,Payroll providers,Employers
Login screen

Property definitions:
errorCode— The account connection error relevant to the login screen that occurred. Possible values:auth_required,connection_unavailable,expired_credentials,invalid_auth,invalid_credentials,mfa_cancelled_by_the_usererrorMessage— The account connection error message shown to the user.
MFA screen

Property definitions:
type— Whether MFA occurred during login. Possible value:LoginmfaType— The type of MFA. Possible values:sms_code,email_code,secret_question,email_link_confirmation,otp_code,email_message_confirmation
Success screen

Account status screen

Account error screen

Property definitions:
connectionStatus— Theconnection.statusof the Account.connectionErrorCode— The account connection error that occurred.
connectionErrorCode is only returned when connectionStatus = errorLink error screen

Property definitions:
errorType— The Link error that occurred.
Link closed
Occurs when the user closes Link from any screen.
Property definitions:
closeMethod— How Link was closed.
footer_button— Link was closed by the user selecting theDone(re-nameable) button on a final screen.x— Link was closed by the user selecting[X]in the upper-left of the screen.null— Link was closed programmatically via an Argyle SDK, or when the onCantFindItemClicked callback is used, or any other event that causes Link to close.