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.
Reminder of Legislation
According to GDPR, it is mandatory to give the user the option to modify their choices at any time and in a simple way. You have two options:
- Provide access to the CMP via a link in the footer or menu
- Provide access to the CMP via our "Privacy Widget"
Privacy widget
The Privacy Widget AppConsent is a button that appears on your web page and allows the user to quickly interact with the CMP to manage their consents.
This is a simple and elegant way to allow your users to manage their consents.
Implementation ⌘
Users have to be able to display the privacy center at will.
- You can either implement 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>
- You can use the
privacyWidget
option on init.
This button can either be positioned inside a DOM Element by using the target
option, or made floating by not specifying it.
In order for an Internet user to see it, a consent must have been given beforehand.
It exists in two colors, dark
and clear
.
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