Manually display the CMP

It is imperative to allow users to withdraw their consent at any time, in accordance with GDPR requirements.

This is why the icon allows them to view and modify their choices at any time.

However, it is possible to hide this icon by opting for another display mode. You can, in fact, display a link in the footer of your site instead, by selecting the appropriate option in the management console.

Here are the steps to hide the icon and display a link in the footer:

  1. In the management console of your CMP, select the "Manage in the footer" option under the "Display style" section of the "Update images and button" tab.

  2. Once this option is selected, add a link that allows users to reopen the CMP in the footer of your site (see below).

  3. If you do not comply with the display rule allowing users to withdraw their consent via the footer, the system will automatically switch to the "icon" mode to ensure GDPR compliance.

Indeed, it is possible to trigger the display of the CMP with the JavaScript command window.Sddan.cmp.displayUI(). Depending on your needs, you can integrate this into a JavaScript script or in an HTML link on your site.

Please note that this command will display the CMP only for users to whom GDPR applies, based on your CMP configuration. For other users, the CMP will not be displayed.

//JavaScript script demo
<script>window.Sddan.cmp.displayUI();</script>
<!-- HTML link demo -->
<a href="javascript:window.Sddan.cmp.displayUI();">Cookies settings</a>

It is crucial that the link to reopen the CMP is present on the page when it first loads. The CMP checks for the existence of this link at load time to determine whether or not it should display the consent icon. This means that the link must be synchronously integrated into the HTML code of the page.

It is therefore not possible to add it asynchronously, for example via a JavaScript script that would execute after the CMP is loaded. If the link is not present when the CMP performs its check, the icon will be displayed by default.

Dernière mise à jour

Cet article vous a-t-il été utile ?