WordPress QC Choice
-
Hi
Can you tell me if QC is working correctly on This page
https://appuals.com/100-disk-usage-by-system-and-compressed-memory-in-windows-10/
I just added the UNiversal Tag into the head and it seems to be blocking ads prior to loading, but i am not sure if this is correct.
Also how do i customise the UI message like buzzfeed? The message is too long currently.
-
Yes, ads are blocking and load after Quantcast !
What method did you use to make it work?
Just used the usual tag given by them.
You integrate your adsense codes in hard or Google Tag Manager?
Adsense codes are hardcoded, not using tag manager.
@kamilanwar1 I am seeing an ad on the left hand side before I give consent.
If you are manually adding your adsense codes I think you need to do something like this:
<html> <head> <title>Your site title</title> </head> <body> <script> ( function() { var insertAdsByGoogleJs = function() { var element = document.createElement('script'); var firstScript = document.getElementsByTagName('script')[0]; var url = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"; element.async = true; element.type = 'text/javascript'; element.src = url; firstScript.parentNode.insertBefore(element, firstScript); }; // Run this in an interval (every 0.1s) just in case we are still waiting for consent var cnt = 0; var consentSetInterval = setInterval(function(){ cnt += 1; // Bail if we have not gotten a consent response after 60 seconds. if( cnt === 600 ) clearInterval(consentSetInterval); if( typeof window.__tcfapi !== 'undefined' ) { // Check if window.__tcfapi has been set clearInterval( consentSetInterval ); window.__tcfapi( 'addEventListener', 2, function( tcData,listenerSuccess ) { if ( listenerSuccess ) { if( tcData.eventStatus === 'tcloaded' || tcData.eventStatus === 'useractioncomplete' ) { if ( ! tcData.gdprApplies ) { // GDPR DOES NOT APPLY // Insert adsbygoogle.js onto the page. insertAdsByGoogleJs(); } else { // GDPR DOES APPLY // Purpose 1 refers to the storage and/or access of information on a device. var hasDeviceStorageAndAccessConsent = tcdata.purpose.consents[1] || false; // Google Requires Consent for Purpose 1 if (hasDeviceStorageAndAccessConsent) { // GLOBAL VENDOR LIST - https://iabeurope.eu/vendor-list-tcf-v2-0/ // CHECK FOR GOOGLE ADVERTISING PRODUCTS CONSENT. (IAB Vendor ID 755) var hasGoogleAdvertisingProductsConsent = tcData.vendor.consents[755] || false; // Check if the user gave Google Advertising Products consent (iab vendor 755) if(hasGoogleAdvertisingProductsConsent) { // Insert adsbygoogle.js onto the page. insertAdsByGoogleJs(); } } } } } } ); } cnt++; }, 100); })(); </script> <!-- One test unit for GDPR --> <ins class="adsbygoogle" style="display:inline-block;width:970px;height:250px" data-ad-client="ca-pubxxx" data-ad-slot="slot_id"> </ins> <!-- Another test unit for GDPR --> <ins class="adsbygoogle" style="display:inline-block;width:250px;height:250px" data-ad-client="ca-pubxxx" data-ad-slot="slot_id"> </ins> <script> // This will trigger the ad request if ads were unpaused in the CMP consent check above. (adsbygoogle = window.adsbygoogle || []).push({}); </script> </body> </html>For customizations, we have options listed in help center here https://help.quantcast.com/hc/en-us/sections/360006841354-Setup
Could it be due to global consent?
Or may be you have visited the site before?
Can you close all browsers and then open Chrome > incognito mode and open the link?
@kamilanwar1 not seeing Choice on the page here https://appuals.com/100-disk-usage-by-system-and-compressed-memory-in-windows-10/ any more. Maybe we could try to connect for a chat? If you tried implementing the code above and it is not working I would like to chat and figure out how to fix that so that I can share it with others who manually add tags. Are you on the WordPress Slack channel?
The topic ‘WordPress QC Choice’ is closed to new replies.
