Event Javascript
Description
The widget service provides a way to retrieve tracking information by dispatching events via the use of postMessage which enables cross-origin communication between window objects. See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage for more info about the technology.
For example, when performing an 'Add Connection' flow, we make it possible for you to be aware of the flow's result by adding an event listener on "message" events.
In the application, subscribe to message events:
window.addEventListener("message", (e) => {
// e.data will contain the useful data
console.log(e.data)
})
When the flow ends the above will catch the event and output:
{
result: "created",
status: "success",
connection_id: "123456"
}
Events list
Some events are "Global", they can spread from any Widget. They are the first of the list below and have the value "Global" in the column "Widget screen".
For example, the event that warns that the widget has been resized spreads regardless of the widget currently displayed.
Widget screen | Event name | Description | Triggering | Properties |
---|---|---|---|---|
Global | resize | Returns the new widget size after a resize | on widget resize | {"innerWidth": int, "innerHeight": int, "outerWidth": int, "outerHeight": int} |
Global | leave | This event is triggered when the user clicks on the cross to close the widget or when the window is closed | on click exit button | {"client_id": "uuidv4", "redirect_uri": "url", "closing_type": "Button |
Global | redirect_to | This event is triggered when the browser will redirect on the redirect_url | When user is redirected (change from a widget to another) | {"client_id": "uuidv4", "redirect_uri": "url"} + list of redirection parameters that depends of the parameters available (status, queue_id, connection_id ...) |
Choose bank | choose_bank_enter | When the choose bank widget is opened on load | {"client_id": "uuidv4", "user_id": "int, optional"} | |
Choose bank | choose_bank_loading_error | This event is triggered when the list of bank can not be loaded | on response error | {"client_id": "uuidv4", "error": "String", "user_id": int} |
Choose bank | choose_bank_selected | This event is triggered when the user select a bank and click on bank name | on click "Next Step" button | {"client_id": "uuidv4", "user_id": int, "bank_id": int, "bank_name": "String", "bank_branch_name": "String"} |
PSD2 Consent | psd2_consent_authorize_url_success | This event is triggered after authorized url is requested | on response success | {"client_id": "uuidv4", "user_id": "int", "bank_id": "int", "bank_name": "String", "bank_branch_name": "String", channel_definition_id: "int"} |
PSD2 Consent | psd2_consent_authorize_url_failure | This event is triggered after authorized url is requested | on response error | {"client_id": "uuidv4", "user_id": "int", "bank_id": "int", "bank_name": "String", "bank_branch_name": "String", channel_definition_id: "int"} |
PSD2 Consent | psd2_consent_selected | This event is triggered when the user click on next step button | on click "Next Step" button | {"client_id": "uuidv4", "user_id": "int", "bank_id": "int", "bank_name": "String", "bank_branch_name": "String", channel_definition_id: "int"} |
Terms | terms_conditions_open_terms | This event is triggered when the user clicks on Terms and condition button | on load | {"client_id": "uuidv4", "user_id": "int", "bank_id": "int", "bank_name": "String", "bank_branch_name": "String", channel_definition_id: "int"} |
Terms | psd2_consent_open_details | This event is triggered when the user clicks on data information button | on load | {"client_id": "uuidv4", "user_id": "int", "bank_id": "int", "bank_name": "String", "bank_branch_name": "String", channel_definition_id: "int"} |
Terms | psd2_consent_open_privacy_policy | This event is triggered when the user clicks on privacy policy button | on load | {"client_id": "uuidv4", "user_id": "int", "bank_id": "int", "bank_name": "String", "bank_branch_name": "String", channel_definition_id: "int"} |
Bank login | bank_login_credential_enter | When the bank login widget is opened | on load | {"client_id": "uuidv4", "user_id": "int, optional"} |
Bank login | bank_login_credential | We send this event for each credentials when the user click on next step button | on click "Next Step" button | {"client_id": "uuidv4", "user_id": int, "credential_id": int, "credential_type": "String (PWD, DOB)", "credential_label": "String"} PWD = Password, DOB = Date of birth |
Synchronization | synchronization_enter | When the synchronization widget is opened | on load | {"client_id": "uuidv4", "user_id": "int, optional"} |
Synchronization | synchronization_start | This event is triggered at the start of the synchronization when the users enter. | when the synchronization loads | {"client_id": "uuidv4", "user_id": int, "started_at": timestamp} |
Synchronization | challenge_enter | When the user encounter a challenge, he is sent on a page that asks him to act (confirm send challenge, challenge value). We want to track all challenges | when the challenge loads | {"client_id": "uuidv4", "user_id": int, "credential_id": int, "credential_type": "String (PWD*, DOB**)", "credential_label": "String"} |
Synchronization | synchronization_success | When synchronization finish with success | when the success container loads | {"client_id": "uuidv4", "user_id": int, "ended_at": timestamp, "duration_time": float, "status": "String", "queue_id": "String"} |
Synchronization | synchronization_error | When synchronization finish with failure | when the error container loads | {"client_id": "uuidv4", "user_id": int, "ended_at": timestamp, "duration_time": float, "event_status": "String", "error": "String"} |
Consent | consent_enter | When the consent widget is opened | on load | {"client_id": "uuidv4", "user_id": "int, optional"} |
Consent | consent_submit_success | The user accept consent (or close the window) and we send this event with the list of asked scopes | on click "Next Step" button | {"client_id": "uuidv4", "user_id": "int", "scopes": "String", "authorization": boolean} |
Consent | consent_submit_error | An error occurend when the user authorizes issuer to send data to partners | on response error | {"client_id": "uuidv4", "user_id": "int", "scopes": "String", "error": "String"} |
Consent | consent_for_accounts_success | The user gives consent for selected accounts | on submit button click | {"client_id": "uuidv4", "user_id": "int", "queue_id": "String", "connection_id": "String", "channel_definition_id": "int"} |
Consent | consent_for_accounts_failure | The user gives consent for selected accounts and an error occures | on submit button click | {"client_id": "uuidv4", "user_id": "int", "queue_id": "String", "connection_id": "String", "channel_definition_id": "int"} |
Manage connection list | connection_list_enter | When the connection list page is displayed | on load | {"client_id": "uuidv4", "user_id": "int"} |
Manage connection list | connection_click | When the user clicks on connection | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Manage connection list | connection_list_error_toast | When the system displays toast error on connection list page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "List(String)","bank_id": "List(int)", "bank_name": "List(String)", "bank_branch_name": "List(String)", "connection_status":"List(String)"} |
Manage connection list | connection_list_information | When the system displays information icon on connection list page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "List(String)","bank_id": "List(int)", "bank_name": "List(String)", "bank_branch_name": "List(String)", "connection_status":"List(String)"} |
Manage connection list | add_connection_click | When the user clicks on “Ajouter une connexion” button | on click | {"client_id": "uuidv4", "user_id": "int"} |
Manage connection list | synchro_all | When the user clicks on synchronization icon | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Manage connection list | synchro_all_error | When user wants to synchronize but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Manage connection detail | connection_detail_enter | When the system displays connection detail page | on load | {"client_id": "uuidv4","user_id": "int","connection_id": "String","bank_id": "int","bank_name": "String", "bank_branch_name":"String","connection_status": "String","channel_statut": "String","channel_type": "String","channel_name": "String"} |
Manage connection detail | connection_detail_error_toast | When the system displays toast error on connection detail page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status": "String", "channel_statut": "String","channel_type": "String","channel_name": "String"} |
Manage connection detail | connection_detail_error_toast_click | When the user clicks on toast error on connection detail page | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status":"String", "channel_statut": "String", "channel_type": "String","channel_name": "String"} |
Manage connection detail | connection_detail_information_toast | When the system displays information toast on connection detail page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status": "String", "channel_statut": "String", "channel_type": "String", "channel_name": "String"} |
Manage connection detail | add_channel_enter | When the system displays “Ajouter ces comptes” button | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status": "String", "channel_statut": "String", "channel_type": "String", "channel_name": "String"} |
Manage connection detail | add_channel_click | When the user clicks on “Ajouter ces comptes” button | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status": "String", "channel_statut": "String", "channel_type": "String", "channel_name": "String"} |
Connection options | connection_option_click | When the user clicks on “connection option” icon | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_enter | When the system displays connection option page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_rename | When the user clicks on “renommer” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_rename_error | When user wants renames but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_synchronization | When the user clicks on “synchroniser” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_synchronization_error | When user wants to synchronize but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_archive | When the user clicks on “archiver” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_archive_error | When user wants arhieve but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_unarchive | When the user clicks on “desarchiver” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_unarchive_error | When user wants desarchive but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_delete | When the user clicks on “supprimer” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Connection options | connection_option_delete_error | When user wants deletes but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_clicks | When the user clicks on account option | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status": "String","channel_statut": "String", "channel_type":"String", "account_statut": "String", "account_id": "String"} |
Account options | account_option_enter | When the widget displays account option page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status":"String","channel_statut": "String","channel_type": "String","account_statut": "String", "account_id": "String"} |
Account options | account_option_information_toast_enter | When the system displays toast error on account option page | on load | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String", "connection_status": "String", "channel_statut": "String", "channel_type": "String", "account_statut": "String", "account_id": "String"} |
Account options | account_option_rename | When the user clicks on “renommer” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_rename_error | When user wants renames but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_archive | When the user clicks on “Archive” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_archive_error | When user wants achives but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_unarchive | When the user clicks on “Desachive” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_unarchive_error | When user wants desachives but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_delete | When the user clicks on “Supprimer” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Account options | account_option_delete_error | When user wants deleted but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Channel options | channel_edit_credentials_red_click | When the user clicks on "Renouveler l'authentification" | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Channel options | channel_edit_credentials_emb_click | When the user clicks on “Modifier les identifiants” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Channel options | channel_synchronize | When the user clicks on “synchroniser” | on click | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |
Channel options | channel_synchronize_error | When user wants synchronize but there is an error | on response error | {"client_id": "uuidv4", "user_id": "int", "connection_id": "String","bank_id": "int", "bank_name": "String", "bank_branch_name": "String"} |