Didomi - Developers documentation
  • Introduction
  • SDKs
    • Introduction
    • Web SDK
      • Getting started
      • Tags and vendors management
        • Tags management
          • Events & Variables
            • Deprecated
            • Custom events
          • Tag managers
            • Adobe Launch/DTM
            • Eulerian
            • Google Tag Manager
              • Configure the Didomi / GTM integration
              • Didomi's GTM template
            • Tealium
            • Other tag managers
        • Custom Didomi <script> tags
        • Third-party integrations
          • Google Ad Manager / AdSense
            • GDPR via Non-Personalized Ads
              • Share consent and load/refresh ads
              • Share consent without loading or refreshing ads
            • US states laws
          • Google Consent Mode V2
          • Kameleoon
          • Piano Analytics (AT Internet)
          • Prebid
            • GDPR via IAB TCF
            • US states laws
          • Salesforce DMP (Krux)
        • IAB frameworks
        • Programmatic API
      • Configuration
        • Bots (SEO & Performance tools)
        • Configuration by URL
        • Cookies and storage
        • Custom domains for events
        • Notice
          • Behavior
          • Interactions
          • Look and feel
        • Preferences
        • Theme
      • AB tests
      • Custom domain
        • Domain delegation
        • Reverse proxy
      • Share consents between domains
      • Share consents across devices
      • Pass user choices in query string
      • Serve Didomi assets from your domain
      • Reference
        • API
          • Deprecated
        • Events
      • Performance
    • Mobile and TV SDKs
      • Android and Android TV
        • Setup
        • Logging
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • iOS and tvOS
        • Setup
        • Logging
        • App Tracking Transparency (iOS 14.5+)
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • Unity
        • Setup
        • Reference
        • Versions
        • Troubleshooting
      • React Native
        • Setup
        • Reference
          • Deprecated
        • Versions
      • Flutter
        • Setup
        • Reference
        • Versions
      • Consent notice
        • Getting started
        • Customize the notice
        • Customize the preferences popup
        • Customize the theme & UI
        • Load notice by ID
      • Third-party SDKs
      • Share consents across devices
      • Share consent with WebViews
      • Google Consent Mode v2
      • FAQ
    • AMP SDK
      • Blocking Behaviors
        • Load immediately on page load
        • Load only after consent (positive or negative)
        • Load only after positive consent
      • Consent status for vendors
    • Help & Support
  • API
    • Introduction
      • Authentication
      • Errors
      • Pagination
      • Filters
      • Caching
      • Rate limiting
      • Quotas
      • Translations
    • Data Manager
      • Regulations
      • Configuration Tree
      • Purposes
        • Purposes & Vendors Numerical IDs
      • Preferences Library
      • User Rights
    • Widgets
      • Consent notices
        • Notices
        • Configurations
        • Multi-Regulation Configurations
          • Migration of Existing Notices and API Updates
        • Deployments
        • Tutorials
          • Create and publish a consent notice
          • Create and publish a multi-regulation consent notice
      • Privacy widgets
        • Create a widget
        • Retrieve widgets
        • Edit a widget
          • Content & Design
            • Themes & Shapes
            • Components
              • auth
              • dsar_form
              • footer
              • header
              • preference
              • preference_value
              • save
              • section
              • sections
            • Options
          • Purposes & preferences
          • Settings
        • Deploy a Widget
          • Use your own subdomain
          • Use your own domain
          • Implement an embeddable widget on your website
        • Authentication
          • Manage authentication providers
          • Authenticate your end-user
        • Archive a widget
        • Headless widgets
          • Public Methods
          • Custom elements
          • Custom events
          • Event listeners
        • Tutorial
          • Launch a Preference Center from a mobile app
    • Compliance Reports
      • Properties
      • Reports
      • CSV format reference
      • Websites
    • Consents and Preferences
      • Events
        • Generate IAB TCF consent string
      • Links
      • Proofs
      • Tokens
      • Secrets
      • Users
      • Tutorial
        • Collect and operate data
    • Privacy Requests
      • Requests
      • Notes
      • Links
      • Emails
  • Integrations
    • Introduction
      • Quotas
    • Generic integrations
      • Batch export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
        • Exported data
          • Notices consents
        • Logs
      • Webhooks
      • Batch import
      • Analytics export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
    • Third-party apps
      • CMP integrations
        • Didomi-mParticle integration for your CMP
        • Deploy Didomi’s SDK for your Adobe Commerce website
      • Preference Management Platform integrations
        • Actito
        • Adobe Campaign Classic
        • Adobe Experience Cloud
        • Adobe Marketo Engage
        • Adobe Source Connector
        • Braze
        • Dotdigital
        • Hubspot
        • Mailchimp
        • Microsoft Dynamics 365
        • Salesforce Marketing Cloud
        • Salesforce Sales & Service Cloud
        • Selligent
        • Brevo (ex Sendinblue)
    • Tutorials
      • Configure a HTTP webhook
      • Configure a batch export
      • Configure an analytics export
    • Emailing
      • Configurations
        • Actito Email
        • Actito SMS
        • Adobe Campaign Classic
        • Adobe Campaign Standard
      • Emails
        • Templates
        • Manage your templates
Powered by GitBook
On this page
  • Configure Didomi
  • Change the Preferences - Purposes text
  • Select the vendor in the consent notice
  • Enable the correct Piano Analytics mode on your website
  • 1. Opt-in or essential mode
  • 2. Opt-out mode
  • Deploy the opt-out button
  1. SDKs
  2. Web SDK
  3. Tags and vendors management
  4. Third-party integrations

Piano Analytics (AT Internet)

PreviousKameleoonNextPrebid

Last updated 2 months ago

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:

  • The use of their

  • Activating and configuring a

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 Notices section and select the notice related to the use of Piano Analytics.

Select the Content editor section of your notice in Customization and go to the Purposes specific subsection 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.

Select the vendor in the consent notice

Then, select the Vendors & Purposes section in Regulations to add the Piano (Hybrid Analytics) vendor with the ID pianohybr-R3VKC2r4.

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
  const userStatus = Didomi.getCurrentUserStatus();
  const defaultStatus =
    userStatus.vendors.hasOwnProperty("pianohybr-R3VKC2r4") &&
    userStatus.vendors["pianohybr-R3VKC2r4"].enabled;

  if (defaultStatus) {
    // If the consent status is true, activate the opt-in visitor mode
    pa.consent.setByPurpose("AM", "opt-in");
  } else {
    // Else, if the visitor mode is not "opt-out", then activate the essential mode
    if (
      pa.consent.getByPurpose().AM.mode == null ||
      pa.consent.getByPurpose().AM.mode !== "opt-out"
    ) {
      pa.consent.setByPurpose("AM", "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 openCurrentUserStatusTransaction().

Below is an example using a button with an ID #optout-piano.

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

    pa.consent.setByPurpose("AM", "opt-out");
  });
});

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.

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

piano analytics tag
default consent mode
here
Exemple of Preferences - Purposes text