ParulMishra
Crownpeak Employee
Crownpeak Employee

How to suppress a banner

Accept and decline button functions

When the options dialogue is open the "Accept" button really means "Save preferences" which is a way for visitors to save their decision, not to opt into the vendors. The "Decline" button is really a "cancel" button meaning the visitor has decided not to save their preferences meaning they have not made a consent decision.

Decline button function

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.

window.evidon.consentDeclinedCallback = function ()

Recommendation

If you would like a different experience for your site visitors, we recommend adding code into the consentDeclinedCallback callback function. 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.consentDeclinedCallback = function ()
{ window.evidon.notice.dropSuppressionCookie(30);
// this is executed if the user explicitly declines giving consent by // using a Decline button }

In this example, window.evidon.notice.dropSuppressionCookie(30); will suppress the UI for 30 days. You can also take custom actions inside the decline callback.

pic.PNG

Labels (1)
Comments

Hi,

 

I have a question on dropSuppressionCookie(days). I am invoking this function by passing days param value as either null or 0 to create session cookie to suppress notification banner for that session however I don't see any effect at all - no session cookie is created. In all other cases, when I pass days param value as either 1 or higher it does creates _evidon_suppress_notification_cookie however this cookie is not tied to the session and remains there forever till it expires. 

 

Best,

Nitin

Hi @nitinpatel . Thanks for the question. I'm working on finding the right person to respond. We'll be back with you soon.

Hi Nitin,

The window.evidon.notice.dropSuppressionCookie days param minimum is 1.
I'm afraid that we do not have another option.

Best,

Nick Foster
Support Engineer

Hi Nick,

 

Pls refer to Evidon’s JavaScript API guidance here. There, if you see the documentation for dropSuppressionCookie(days), it clearly states that passing null or 0, drops a session cookie however it’s not working out for me. Do you think someone from your technical team can look into it and see how dropSuppressionCookie(days) can be used to create a session cookie?

 

Best,

Nitin

@nitinpatel 

I spoke with @NickFoster and it looks like you've uncovered a bug. Apologies. We've escalated to our Engineering team and I have a note on the ticket to report back to you when the issue is resolved. We appreciate your patience.

Best
Ari

Can't find what you are looking for?

Find Answers

Search our DG Forum to find answers to questions asked by other DG users.

Ask a Question

No luck? Ask a question. Our Product and Support teams are monitoring the Forum and typically respond within 48 hours.

Ask a Question