To comply with data privacy requirements and offer your users control over tracking, you must integrate an opt-out option for Mapp Intelligence tracking on your website.
This guide provides code examples for both Tracking Pixel v4/v5 and the Smart Pixel. Choose the appropriate implementation based on your tracking setup.
General Recommendations
Place the Script in the Right Spot: Add the opt-out script to your website in a location where it will reliably execute (e.g., within the <head> or just before the closing <body> tag).
Test the Integration: Verify the opt-out functionality by checking if the respective cookie (webtrekkOptOut for v4/v5 or Smart Pixel’s opt-out cookie) is properly set and that tracking stops for opted-out users.
User Interface: Provide a clear and accessible button or link in your privacy settings or footer for users to activate the opt-out functionality.
Opt-Out for Smart Pixel
For the Smart Pixel, use the following script to enable opt-out functionality:
<script type="text/javascript">
window.wtSmart = window.wtSmart || [];
window.wtSmart.push(function(wtSmart) {
wtSmart.utils.optout.setTrackingOptOut(10*12*30*24*60);
});
</script>Key Notes:
The opt-out mechanism is handled via the Smart Pixel’s wtSmart library.
It sets a long-term opt-out option valid for approximately 10 years (10*12*30*24*60 minutes).
This ensures that no data is tracked for users who opt out.
Opt-Out for Tracking Pixel v4/v5
<script type="text/javascript">
window.wts = window.wts || [];
if (typeof window.wts.get === 'function') {
window.wts.get('setCookie')('webtrekkOptOut', 1, 10*12*30*24*60);
}
</script>Key Notes:
The script sets a cookie named webtrekkOptOut with a value of 1.
The cookie’s validity is configured for approximately 10 years (10*12*30*24*60 minutes).
This prevents the Tracking Pixel from collecting user data after the opt-out is activated.