Manually display the CMP
Dernière mise à jour
Dernière mise à jour
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:
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.
Once this option is selected, add a link that allows users to reopen the CMP in the footer of your site (see below).
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.
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.
If this link is added asynchronously (for example, via JavaScript after the CMP has loaded), the CMP check will fail, and the icon will be displayed, which does not align with the expected behavior of the CMP without the icon when the link is present in the footer.