In the table below, please find the event callbacks that Sourcepoint supports for web implementations:
The availability of an event callback is dependent on the type of implementation being performed.
Event callback | Description |
onMessageReady |
Event fires when a message is about to display. Will fire for privacy managers since they can also be used as first-layer messages |
onMessageChoiceSelect |
Event fires when a call-to-action button in a message has been clicked. The callback receives two integers. The first is the choice_id and it represents the id value of the choice selected. The second is the choice_type_id which is the ID of the type of choice clicked. Click here for a list of choice type IDs. |
onPrivacyManagerAction |
Event fires when a button in a privacy manager has been clicked. The possible values for the string returned to the function are SAVE_AND_EXIT or CANCEL. |
onMessageChoiceError |
Event fires when there is an error in the message delivery process. A brief description of the error is returned. |
onConsentReady |
Event fires when consentUUID or eu-consent value is ready. |
onPMCancel |
Event fires when a user clicks the dismiss button of the privacy manager. |
onMessageReceiveData |
Event fires when a message is displayed to the user and sends data about the message and campaign to the callback. |
OnSPPMObjectReady |
Event fires when the privacy manager is ready to be displayed on the page. It can be used to notify on-page functions that the privacy manager is now available to be displayed using the Sourcepoint plug and play JavaScript code. |
Choice type ID descriptions
In the table below, please find descriptions for choice_type_id
for the onMessageChoiceSelect
event callback:
Choice type ID | Description |
1 | The user has chosen to view instructions on how to whitelist a site. |
2 | The user has chosen to opt into ad recovery (no longer used). |
4 | The user has chosen to view custom content in an iframe. |
5 | The user has chosen a option to redirect to another page. |
7 | The user has chosen a micropayment option (requires a separate agreement). |
9 | The user has selected an option tied to custom JavaScript on the site page. |
10 | The user has chosen to view a video provided by Welect (requires a separate agreement). |
11 | The user has chosen the Accept All option in a consent message. |
12 | The user has chosen to view a privacy manager (consent preferences). |
13 | The user has chosen the Reject All option from a consent message. |
14 | Samba Video (requires separate agreement with Samba and Sourcepoint). |
15 | Cancel button |
Comments
0 comments