We’ve migrated our documentation to a new site, which means some URLs have changed. If you hit a broken link, submit a support ticket.
Analytics
English French
English French

How do I adapt my tagging to the ACPM specifications?

The ACPM certification is specific to the French market.

The ACPM lets you certify your Piano Analytics data. This certification, however, follows strict specifications that require GDPR-compliant tagging. This compliance must be verifiable and validated by Piano Analytics before the collected data can be sent to the ACPM.

As a result, the tagging in place on your certified sites and apps must populate the visitor_privacy_mode and visitor_privacy_consent properties.

While this happens automatically on the latest Piano Analytics SDKs through the implementation of a consent mode (or the SDK preset), it does not for the SmartTag, the xtcore.js files, or mobile apps using a v2 SDK.

Where possible, we recommend keeping your tagging up to date and on an SDK version maintained by our development teams (currently, the Piano Analytics SDKs, version 6 and above).

If updating the SDKs is not possible, you'll find below a guide to adapt the SmartTag and xtcore tagging accordingly so that certification works correctly.

Piano Analytics SDK

While the new SDKs handle Privacy automatically, they also offer more flexibility in the events sent. Note, however, that the ACPM only certifies page view events, so make sure you send page.display events for your figures to be counted correctly.

Smarttag.js

For the smarttag.js file, the implementation depends on the tag version you use.

> 5.24.0

On files version 5.24.0 and above, we recommend following the guidance in our online documentation: Privacy - Javascript

and relying on the methods tag.privacy.setVisitorOptin() and tag.privacy.setVisitorMode("cnil", "exempt").

< 5.24.0

On files earlier than version 5.24.0, you'll need to push this information manually.

For SDKs version 5.21.0 to 5.23.0, we recommend using the setProps() method:

tag.setProps({
    "visitor_privacy_mode": "exempt", // or optin depending on the consent obtained
    "b:visitor_privacy_consent": false // or true in optin mode
}, true); // Persistent
tag.page.set({'name': 'page_name_set'});
tag.dispatch();

For even earlier files, you can use the setParams() method:

tag.setParam('visitor_privacy_mode', 'exempt', {permanent: true, hitType: ['all'], encode: true}) // Exempt mode
tag.setParam('b:visitor_privacy_consent', false, {permanent: true, hitType: ['all'], encode: true}) // Exempt mode

or

tag.setParam('visitor_privacy_mode', 'optin', {permanent: true, hitType: ['all'], encode: true}) // Optin mode
tag.setParam('b:visitor_privacy_consent', true, {permanent: true, hitType: ['all'], encode: true}) // Optin mode

The setParam() and setProps() methods also exist on the v2 mobile SDKs. The former is recommended up to version 2.17.0 of the Android SDK; after that, we recommend switching to setProps(). The same applies to iOS, where the pivot version is 2.18.0.

Xtcore.js

For the xtcore.js file, the properties must be added to the main tag through the vm and vc query string parameters.

The code example below explains how to implement hybrid-measurement collection on this tag version, depending on the consent given in your CMP:

<script type="text/javascript">
<!--
xtnv = document; //parent.document or top.document or document 
xtsd = "http://logxxxx";
xtsite = "xxxxx"; //site number
xtpage = ""; //page name (with the use of :: to create chapters)
//-->

if (consentGiven) {

xtn2 = ""; //level 2 site
xtdi = ""; //implication degree
xt_multc = ""; //customised indicators
xt_an = ""; //numeric identifier
xt_ac = ""; //category
xt_vm = "optin"; //visitor mode
xt_vc = "true"; //visitor consent (true/false)

//do not modify below
if (window.xtparam!=null){window.xtparam+="&ac="+xt_ac+"&an="+xt_an+xt_multc+"&vm="+xt_vm+"&vc="+xt_vc;}
else{window.xtparam = "&ac="+xt_ac+"&an="+xt_an+xt_multc+"&vm="+xt_vm+"&vc="+xt_vc;};

} else {

xt_vm = "exempt"; //visitor mode
xt_vc = "false"; //visitor consent (true/false)

//do not modify below
if (window.xtparam!=null){window.xtparam+="&vm="+xt_vm+"&vc="+xt_vc;}
else{window.xtparam = "&vm="+xt_vm+"&vc="+xt_vc;};
}
</script>
<script type="text/javascript" src="http://www.mysite.com/xtcore.js"></script>

Note that the xtcore.js file does not natively manage strictly necessary properties, so it is your responsibility to manage the properties sent in exempt mode through the "do not modify below" section present for each xtcore tag.

//do not modify below
if (window.xtparam!=null){window.xtparam+="&vm="+xt_vm+"&vc="+xt_vc;}
else{window.xtparam = "&vm="+xt_vm+"&vc="+xt_vc;};

Don't hesitate to contact our support center if you're unsure which configuration to use in your case.

Last updated: