What should a site user expect when they select the Decline button? Is there any way to customize this functionality?
When a site user selects the Decline button in a banner or barrier, the consentDeclined event is triggered. This hides the notice for the current session, but when the site user opens a new session, either by refreshing or opening a new browser, they will be asked to decline again.
If you would like a different experience for your site visitors, we recommend adding code into the consentDeclinedCallback callback function. Here is the exact function, if it is not included in your tag:
window.evidon.consentDeclinedCallback = function () {
// this is executed if the user explicitly declines giving consent by
// using a Decline button
}
If you would like to suppress the banner or barrier from showing again, you can add the following code inside that function:
window.evidon.notice.dropSuppressionCookie(# of days to suppress);
When you call this API function, the banner or barrier will not display for the number of days provided in the call. For example, window.evidon.notice.dropSuppressionCookie(30); will suppress the UI for 30 days.
You can also take custom actions inside the decline callback.