Documentation > UCP Implementation Guide > Cookie Consent

Cookie Consent

This section outlines the process of adding a cookie consent link either to your page or in other elements such as the banner translation text. 

Implementing Cookie Consent Tool Link

The cookie consent link is available once prior consent is confirmed and is also available to support regions that don’t necessarily require prior consent. It’s visible when  evidon_consent_cookie   is dropped in your user’s browser.

When a user opts out in the consent tool, they are managing their preference with the vendor directly. Some vendors don't allow. Vendor cookie consent does not impact site prior consent.

The following is a list of the available mechanism along with some pros/cons of each.

Anchor Link with Javascript (recommended mechanism)

Our scripts have a fully supported Application Programming Interface (API) included with them.  Part of that API is the ability to instruct our scripts to show the Consent Tool.  Since that is available, and included on every page where our script executes, you can add an html anchor link (<a>) around any text where you want to include a mechanism to open the consent tool. 

The following is an example of how that link could look:

<a href="#" onclick="event.preventDefault(); window.evidon.notice.showConsentTool();">Open Consent Tool</a>

In this link the core functionality is located in the onclick handler of the anchor tag (onclick=””).  Inside that event we do 2 things. 

First, we instruct the script to prevent the default behavior, which is to navigate to the location in the href attribute.  We don’t want that to happen as it may cause the page to reload.

Second, we call the API method showConsentTool(), which is located on our notice object.  This will trigger the consent tool to display.

  • Will show the consent tool using the same logic as our other script components, providing a more unified experience.
  • Uses our API which means any future changes in functionality will automatically be supported.
  • Because it uses the notice settings it will handle any change to how the consent tool is displayed.  For example, if you decide you want to open a new window instead of showing a popup you can change your notice settings and this will automatically pick up those settings and use them. No changes will be required beyond that.
  • Supports showing the Consent Tool as an overlay.
  • Requires the use of Javascript.  This may or not be a con depending on your rules.

Anchor Link with Marker

We support putting in a generic marker into a link element which will be replaced with the consent tool link at runtime.  The marker is the following:


[note:  the open/closing brackets are required]

When we load our elements (the banner for example) we will run a string replacement on that text and automatically change that marker to the correct consent tool url for the active notice and country.

An example of what this would look like:

<a href=”{consentToolUrl}” target=”_blank”>Consent Tool</a>

  • Simple to implement
  • No scripting required
  • Future-proof.  If we make changes to the consent tool format this will automatically adapt to those changes.
  • Doesn’t support showing the consent tool as an overlay.
  • Only works in our translation elements.  Can’t be added to a web page outside our banner or barrier text.

Javascript API

We have provided an example of using a link with javascript to activate our API.  But you can also just call the API from any script on your page.  The call would be the same:


  • Can be used for any element, not just a link.  So you can have your own button for example.
  • Flexible.  Can be used from different scenarios.  For example, if you need to perform some other action before showing the consent tool you can use your own scripts to accomplish that.
  • Like the anchor link example, this will automatically pick up all the settings for the consent tool and use them.
  • Requires you to deploy separate scripts on their site.
  • Doesn’t have an easy integration with any translation elements.  If you want to trigger the consent tool to open from our banner you will need to take some extra steps.

Connect with Crownpeak