Piano Analytics (AT Internet)

Piano Analytics (AT Internet) is an analytics solution authorized by the French Data Protection Authority (CNIL) to provide analytics services without user consent. Piano Analytics supports three modes:

  • Essential (CNIL exemption)

  • Opt-in (Full analytics tracking)

  • Opt-out (Complete deactivation)

Didomi will support the essential and the opt-in mode while the opt-out mode will have to be added on one of your websites pages.

Other Data Protection Authorities in Europe may not allow analytics with Piano Analytics if consent is not given by the user.

This guide will help you activate the Piano Analytics hybrid measure to use the CNIL essential mode.

The Piano Analytics prerequisites for the use of this feature are:

Configure Didomi

If you are using the Piano Analytics essential mode, you will have to add some information to the text displayed in the preference view and add the Piano Analytics vendor in your notice.

Change the Preferences - Purposes text

When using the Piano Analytics hybrid measure feature, you will also have to add a link redirecting to one of your website pages. This page will have to allow your users to completely disable Piano Analytics (opt-out mode).

In the console browse to the Consent Notice section and select the notice related to the use of Piano Analytics.

Select the Look & Feel section of your notice and scroll down to the Preferences - Purposes field to change the content of the text displayed at the top of the Preferences view.

Add the following mention to the existing text in French:

Nous utilisons également des traceurs exemptés du recueil de consentement pour le dépôt des cookies de mesure d'audience. Vous pouvez utiliser une fonction d'opt-out via notre <a href="<https://www.example.com/opt-out-link">politique de confidentialité</a>.

You can change it to fit your needs if you want to. Also, don't forget to change the link https://www.example.com/opt-out-link to the one you want to use. If the link is the same as the one you are using for your Privacy Policy, you can use the {privacyPolicyURL} macro.

Then, select the Vendors & Purposes section to add the Piano (Hybrid Analytics) vendor with c:pianohybr-R3VKC2r4 as an IAB/SDK ID in your notice.

Click on the Save & Publish button on the top left of the page.

Enable the correct Piano Analytics mode on your website

1. Opt-in or essential mode

Once everything is configured in the Didomi console, you have to add the following code to your website along with the Didomi embed code:

window.didomiOnReady = window.didomiOnReady || [];
window.didomiOnReady.push(function (Didomi) {
  // Check the consent status for the Piano Analytics vendor
  var defaultstatus = Didomi.getUserStatus().vendors.consent.enabled.includes("c:pianohybr-R3VKC2r4");
  if (defaultstatus === true) {
    // If the consent status is true, activate the opt-in visitor mode
    pa.consent.setMode("opt-in");
  } else {
    // Else, if the visitor mode is not "opt-out", then activate the essential mode
    if (pa.consent.getMode() == null || pa.consent.getMode() !== "opt-out") {
      pa.consent.setMode("essential");
    }
  }
});

2. Opt-out mode

Piano Analytics also suggests that you add a way for the user to completely deactivate the audience measurement.

Using Didomi and Piano Analytics, you will have to adapt your code to disable the vendor and the purpose along with the audience measurement feature. To do so, you will have to use openTransaction(). Below is an example using a button with an ID #optout-piano.

window.didomiOnReady = window.didomiOnReady || [];
window.didomiOnReady.push(function (Didomi) {
  var button = document.getElementById("optout-piano");
  // Add event handler
  button.addEventListener("click", function () {
    // Open Didomi Transation
    const transaction = Didomi.openTransaction();
    // Disable purpose
    transaction.disablePurpose("audiencem-hJxaeGrR");
    //Disable a vendor
    transaction.disableVendor("c:pianohybr-R3VKC2r4");
    transaction.commit();

    pa.consent.setMode("opt-out");
  });
});

pa.consent.setMode is the method exposed by Piano Analytics to set their consent mode. Their documentation is available here.

Deploy the opt-out button

If you want to use the button mentioned above, you will be able to deploy this by using the following text and code.

« Les cookies Piano Analytics (AT Internet) sont exemptés de la nécessité d'obtenir le consentement, comme indiqué dans l’Arrêt CNIL n°2020-091, dans la mesure où ils sont strictement nécessaires au bon fonctionnement du site. Vous pouvez refuser le traitement de vos données personnelles de navigation en activant cette option. Veuillez noter qu’en cliquant sur le bouton suivant, nous ne pourrons plus mesurer et améliorer nos sites de manière optimale. »

<button id="optout-piano">Opt Out</button>

The link between Didomi and Piano Analytics is now done.

Last updated