Skip to main content

Display privacy widget

You will find below all the stuff to have a floating privacy center or to micro-banner to put in the footer.


The GDPR requires that it be made clear to the user that they can change their choices at any time in a simple manner. As such, the default texts of the CMP banners are compliant. You must therefore create a link in the footer of your site or in the menu of your application so that the user can exercise his rights.

Displaying a Privacy widget

Users have to be able to display the privacy center at will.

You can either implement it yourself, on a link for example:

<a href="#" onclick="javascript:__tcfapi('show', 2, function(){}, {jumpAt: 'privacy'})">Display the Privacy center</a>

if your website is created with aspx C# and .NET framework please use this :

<a href="#" OnClick="__tcfapi('show', 2, function(){}, {jumpAt: 'privacy'})">Display the Privacy center</a>

Or you can use the privacyWidget option on init. This renders the following

privacy widget

This button can either be positioned inside a DOM Element by using the target option, or made floating by not specifying it.

It exists in two colors, dark and clear.

dark privacy widget

dark color

clear privacy widget

clear color

In order for an Internet user to see it, a consent must have been given beforehand.

Example:

Floating widget

<script type="text/javascript">
__tcfapi('init', 2, function(){}, {
appKey: 'PUT YOUR APPKEY',
privacyWidget: {
color: 'clear',
position: 'bottomLeft',
text: 'Privacy center',
}
})
</script>

Placeholded widget

<script type="text/javascript">
__tcfapi('init', 2, function(){}, {
appKey: 'PUT YOUR APPKEY',
privacyWidget: {
target: document.getElementById('target'),
color: 'dark',
text: 'Privacy center',
}
})
</script>
note

bottomLeft will place the icon on the bottom left corner of your website.

bottomRight will place the icon on the bottom right corner of your website