I use Quantcast for my cookies acceptance.
It support only IAB vendor, so Facebook isn't included since it's not a IAB vendor.
For that reasorn I'm trying to add code for my Facebook pixel manually, for blocking it when user open my site and load it if user accept cookies by Quantcast banner.
First of all I add Facebook as non-IAB vender on my Quantcast account.
In this page I found the following code:
__tcfapi('getNonIABVendorConsents', 2, function(consent, success) {
// check consent for non-IAB vendor with id 1. Always check
// whether the callback returned success and GDPR applies
if ( success
&& consent.gdprApplies
&& consent.nonIabVendorConsents[1]
) {
// Use getTCData to validate consent is given for the
// purposes declared in the configuration step
__tcfapi('getTCData', 2, function(tcdata, success) {
if ( success
&& consent.gdprApplies) {
if ( tcdata.purpose.consents[1]
&& tcdata.purpose.consents[3]) {
nonIabCompanyTag(); // replace this with your own code
console.log("Debug: ", tcdata.purpose.consents[1],
tcdata.purpose.consents[3]);
}
}
});
}
});
I'm not familiar with this code, but seems that it is a javascript, right?
If I understand well, I need to add my code at place of
nonIabCompanyTag(); // replace this with your own code
I tried to replace code with my Facebook pixel code but nothing happens if I accept or not accept the cookies with Quantcast banner.
Someone can help me?