About Tarteaucitron
Tarteaucitron is a French Consent Management Platform (CMP) that allows you to manage your cookies and GDPR policy in full compliance. It is open-source, and provides a simple and effective implementation that is continually enhanced thanks to regular contributions from the developer community.
Tarteaucitron is accessible in two ways:
- A free version with no support and limited installation documentation (but sufficient).
- A paid version that offers multilingual support, enhanced customization, a WordPress plugin, activation statistics, and more."
Learn more on https://tarteaucitron.io/fr/.
Features
- Consent Management
- One-click service addition
- Full customization
- Open-source community
- Activation monitoring
PA Connect Tarteaucitron
The PA Connect Tarteaucitron allows you to deploy a Piano Analytics audience measurement strategy in compliance with the latest recommendations from the CNIL.
Connector principles
The first step consists in downloading the Tarteaucitron scripts available on the Github page.
Once the libraries are downloaded, you can call them in your site's script and add our privacy management methods. When the script is operational, you can then gather consent from your visitors using the Tarteaucitron CMP and begin using the privacy analyses available on Piano Analytics.
"Consent Management" privacy methods, PA JS >6.8
To get started, you need to install the tarteaucitron.js and tarteaucitron.services.js libraries from Github.
Before going any further on the process, you have to update the privacy script in the tarteaucitron.services.js file to make it compatible with the "Consent Management" methods of the Piano Analytics SDK. To do so, replace the script in the "//pianoanalytics" section with the following:
tarteaucitron.services.pianoanalytics = {
"key": "pianoanalytics",
"type": "analytic",
"name": "Piano Analytics",
"uri": "https://support.piano.io/hc/fr/categories/4467759793298",
"needConsent": true,
"safeanalytic": false,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.paLibUrl === undefined) {
return;
}
if (tarteaucitron.user.paAlreadyLoaded !== undefined) {
return;
}
tarteaucitron.addScript(tarteaucitron.user.paLibUrl, '', function () {
if (typeof window.pa.consent !== 'undefined') {
window.pa.consent.setMode('opt-in');
}
if (typeof tarteaucitron.user.paMore === 'function') {
tarteaucitron.user.paMore();
}
});
},
"fallback": function () {
"use strict";
if (tarteaucitron.user.paLibUrl === undefined) {
return;
}
tarteaucitron.user.paAlreadyLoaded = true;
tarteaucitron.addScript(tarteaucitron.user.paLibUrl, '', function () {
if (typeof window.pa.consent !== 'undefined') {
var visitorMode = window.pa.consent.getMode();
if (visitorMode !== null && visitorMode == "opt-out") {
window.pa.consent.setMode('opt-out');
} else {
window.pa.consent.setMode('essential');
}
}
if (typeof tarteaucitron.user.paMore === 'function') {
tarteaucitron.user.paMore();
}
});
}
};
You can now call the tarteaucitron.js file in your source code:
<script src="Tarteaucitron1.14.0/tarteaucitron.js"></script>
<script type="text/javascript" src="https://tag.aticdn.net/piano-analytics.js"></script>
Then, add the following script to set up your Tarteaucitron CMP:
<script src="/tarteaucitron/tarteaucitron.js"></script> <script type="text/javascript"> tarteaucitron.init({ "privacyUrl": "", /*Privacy policy url */ "bodyPosition": "bottom", /* or top to bring it as first element for accessibility */ "hashtag": "#tarteaucitron", /* Open the panel with this hashtag */ "cookieName": "tarteaucitron", /* Cookie name */ "orientation": "middle", /* Banner position (top - bottom) */ "groupServices": false, /* Group services by category */ "showDetailsOnClick": true, /* Click to expand the description */ "serviceDefaultState": "wait", /* Default state (true - wait - false) */ "showAlertSmall": false, /* Show the small banner on bottom right */ "cookieslist": false, /* Show the cookie list */ "closePopup": false, /* Show a close X on the banner */ "showIcon": true, /* Show cookie icon to manage cookies */ //"iconSrc": "", /* Optionnal: URL or base64 encoded image */ "iconPosition": "BottomRight", /* BottomRight, BottomLeft, TopRight and TopLeft */ "adblocker": false, /* Show a Warning if an adblocker is detected */ "DenyAllCta" : true, /* Show the deny all button */ "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */ "highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */ "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */ "removeCredit": false, /* Remove credit link */ "moreInfoLink": true, /* Show more info link */ "useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */ "useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */ //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */ "readmoreLink": "", /* Change the default readmore link */ "mandatory": true, /* Show a message about mandatory cookies */ "mandatoryCta": true /* Show the disabled accept button when mandatory on */ }); </script>
Finally, finish setting up your Piano Analytics tracker and manage your sendEvent method:
<script>
tarteaucitron.user.paLibUrl ='//tag.aticdn.net/piano-analytics.js'; //piano library
tarteaucitron.user.paMore = function(){
//Hits configuration
pa.setConfigurations({
site: 624738, //To be modified
collectDomain: "XXXXXXX.pa-cd.com", //To be modified
addEventURL:true,
campaignPrefix:['at_', 'utm_']
});
//Propagation of context via properties
pa.setProperties({
'page':"test_tarte_citron"
}, {
'persistent': true
});
//Page view information
pa.sendEvent('page.display');
};
(tarteaucitron.job = tarteaucitron.job || []).push('pianoanalytics');
function ActivateOptOut() {
pa.consent.setMode('opt-out');
pa.sendEvent('consent.changed', { 'consent_status': 'optout' });
tarteaucitron.userInterface.respond(event.target, false);
}
function DesactivateOptOut() {
pa.consent.setMode('essential');
pa.sendEvent('consent.changed', { 'consent_status': 'exempt' });
tarteaucitron.userInterface.respond(event.target, false);
}
</script>
Privacy analysis in Piano Analytics
Once your CMP is functional, you will retrieve your consent related data on your Explorer tool, under Privacy > Visitor mode:
You can also use our native privacy properties "Visitor mode" and "Visitor consent" on our data mining tool Data Query:
Additional resources
Here is a list of additional resources that can help you understand this Privacy topic and deploy this connector.
- Privacy Center : All the knowledge to bring privacy and GDPR compliance to your analytics - https://support.piano.io/hc/en-us/sections/4467720428178
- Privacy developer documentation : Technical information about our various Privacy methods -https://developers.atinternet-solutions.com/javascript-en/advanced-features-javascript-en/privacy-javascript-en/
- Partner's documentation : https://tarteaucitron.io/en/install/