Hi @jurgen.vandevelde,
Here is an example (cookiebot statistics is seen as Piwik PRO analytics consent and so on):
<script>
(function(e){function n(){}window.addEventListener("CookiebotOnDialogDisplay",function(e){ppms.cm.api("trackMainFormView",n,n),window.addEventListener("CookiebotOnDecline",function(e){ppms.cm.api("trackRejectAllClick")},!1),document.getElementById("CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection").addEventListener("click",function(e){ppms.cm.api("trackSaveChoicesClick")},!1),document.getElementById("CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll").addEventListener("click",function(e){ppms.cm.api("trackAgreeToAllClick")},!1)},!1),ppms.cm.api("getNewComplianceTypes",function(e){var t;t=e,t.length>0?(window.PPCM_initial_compliance_settings=!0,ppms.cm.api("setInitialComplianceSettings",{consents:t},n,n)):window.PPCM_initial_compliance_settings=!1},n),window.addEventListener("CookiebotOnConsentReady",function(t){var i,o,c,a,s,l={consents:{}},r=["statistics","preferences","marketing"],g=["analytics","ab_testing_and_personalization","conversion_tracking","marketing_automation","remarketing","user_feedback","custom_consent"],C={};for(i=0;i<r.length;i+=1)if(c=r[i],e.hasOwnProperty(c))for(o=0,s=window.Cookiebot.consent[c]?1:0;o<e[c].length;o+=1)a=e[c][o],g.indexOf(a)>=0&&(C[a]=c,l.consents[a]={status:s});window.PPCM_consents_changed=0,ppms.cm.api("getComplianceSettings",function(e){if(void 0===e.consents||window.PPCM_initial_compliance_settings)window.PPCM_consents_changed=1;else{var n,t,i,o;for(n=0;n<g.length;n+=1)i=C[t=g[n]],o=window.Cookiebot.consent[i]?1:0,C.hasOwnProperty(t)&&(void 0===e.consents[t]||e.consents[t].status!==o)&&(window.PPCM_consents_changed=1)}},n),1===window.PPCM_consents_changed&&ppms.cm.api("setComplianceSettings",l,n,n)})})
(
{
statistics: ['analytics'],
preferences: ['ab_testing_and_personalization'],
marketing: ['marketing_automation', 'remarketing', 'conversion_tracking']
},
);
</script>