Verifica del consenso per un fornitore

Per verificare se un determinato fornitore dispone del consenso, ti consigliamo di utilizzare la funzione globale __cmp e il comando getCMPData:

var x = __cmp('getCMPData');
if("vendorConsents" in x)
{
 if("s123" in x.vendorConsents && x.vendorConsents["s123"])
 {
  // Vendor s123 has consent
 }
 else
 {
  // Vendor s123 does not have consent
 }
}

Per l'esempio sopra, tieni presente che devi chiamare il nostro oggetto __cmp() solo quando è già stato caricato. In caso di dubbio, usa un callback nei nostri eventi (ad es. evento "consent" o "settings"):
https://site.staging.consentmanager.net/it/help/riferimento-per-sviluppatori/eventi-cmp/ 

We do our best to keep this purely informative documentation up to date. However, if you notice that any of these guides need a little touch-up, let us know!