Set Up an Event Listener

Flinks Connect triggers events based on authentication responses or different UI steps that are presented to your customer. These events can be useful to listen to for tracing purposes and controlling the user experience. Track these events by adding an event listener to your page.

To add the event listener into your Flinks Connect integration, place the following script on your page:

<!-- Event Listener -->
    window.addEventListener('message', function(e) {

List of events in Flinks Connect

You can receive the following types of events:

Event Description
APP_MOUNTED Flinks Connect has retrieved configuration values from the API, and has successfully loaded.
APP_ONLINE The internet connection was restored.
APP_OFFLINE The internet connection was lost.
ACCOUNT_SELECTED The user selects an account.
COMPONENT_ACCEPT_CONSENT The user accepts to give consent.
COMPONENT_ACCEPT_TERMS The user has checked the box to approve the terms and conditions linked in the URL termsUrl={}.
COMPONENT_CLICK_RESET_PASSWORD The user clicks on the Reset Password button.
COMPONENT_CLICK_TERMS_URL The user clicks on the terms and conditions link.
COMPONENT_CLOSE_SESSION The use clicks on the _X in the top right corner. Related to the < a href="parameters#layout-customization">Layout Customization parameter closeEnable.
COMPONENT_DENY_CONSENT The user denies consent.
COMPONENT_DENY_TERMS The user unchecked the box on the left of the terms and conditions using the parameter termsUrl={}.
COMPONENT_HELP2FA_INFO When Flinks Connect loads the Help2FA component, or if the users goes back from the troubleshooting screen via the back button.
COMPONENT_HELP2FA_TROUBLESHOOTING When Flinks Connect navigates to the troubleshooting screen due to the user clicking the troubleshooting tips link on the info screen.
COMPONENT_LOAD_ACCOUNT_SELECTION When Flinks Connect loads the account selection page. Contains metadata regarding the user's accounts (totalAccounts and displayedAccounts).
COMPONENT_LOAD_CONSENT The consent page is loaded using the parameter consentEnable=true
COMPONENT_LOAD_CREDENTIAL The user is faced with a prompt for FI username and password.
COMPONENT_LOAD_CREDENTIAL_RETRY The user clicks on retry after an authorize error.
COMPONENT_LOAD_MFA The MFA page is loaded. Contains metadata that indicates what MFA challenges the user received (mfaTypes).
COMPONENT_LOAD_MFA_RETRY The user clicks on retry after a failed MFA challenge error.
COMPONENT_PROVIDER_CONSENT_ABOUT When the user visits the about screen by clicking the 'tell me more...' link on the info screen.
COMPONENT_PROVIDER_CONSENT_INFO When Flinks Connects loads the US OAuth consent component (or the user goes back to it from one of the following screens)
COMPONENT_PROVIDER_CONSENT_LEGAL When the user visits the legal screen by clicking the 'privacy policy' link on the info screen.
DISABLED_INSTITUTION An Institution is disabled.
ENHANCED_MFA_HAS_QUESTIONS When there is unanswered question using enhancedMFA=true.
ENHANCED_MFA_NO_QUESTIONS When there is no unanswered question using enhancedMFA=true
ENHANCED_MFA_SUCCESS Successfully completed the enhancedMFA flow using enhancedMFA=true
INSTITUTION_SELECTED The user selected his desired Financial Institution.
INVALID_INSTITUTION An institution is not valid.
INSTITUTION_NOT_AVAILABLE An institution is not available.
MAXIMUM_RETRY_REACHED The maximum amount of retries is reached using the parameter maximumRetry={number}. It is set in the URL as a parameter.
QUESTION_NOT_FOUND The MFA challenge is returned by the API. Contains metadata that indicates what MFA challenges the user received (mfaTypes).

When the user successfully completed the connection. This steps includes the URL, loginId, requestId, and institution. For example:

step: 'REDIRECT' URL: '…-4e36-795b-08db4111f24d&institution=FlinksCapital', loginId: 'b92b2bbd-31f8-4e36-795b-08db4111f24d', requestId: 'de4d15c4-5738-4004-81b2-fb28c5e4c1a0', institution: 'FlinksCapital'

RETRY_COUNT The authorization failed and the retry count is incremented. Staring at 0.
SESSION_NONEXISTENT or SESSION_EXPIRED When the session has expired.
SESSION_STORAGE_BLOCKED Legacy cookie management (deprecated).
SESSION_STORAGE_BLOCKED_RETRY Legacy cookie management (deprecated).
SKIP_ENHANCED_MFA The user skips the unanswered MFA question using skipEnhancedMFA=true.
SUBMIT_ANSWER_MFA_QUESTIONS The user submits the unanswered MFA questions.
SUBMIT_CREDENTIAL The form is valid and the user clicks on continue.
SUBMIT_GET_MFA_QUESTIONS When Flinks Connect gets unanswered MFA questions using enhancedMFA=true.
SUBMIT_MFA The user submits the MFA.
BACK_SECTION The user clicks on the back arrow enabled by the backEnable parameter.

For more information about what each of these events look like in the Flinks Connect flow, see the examples on our help article page.