Title: Quantcast
Last modified: August 23, 2020

---

# Quantcast

 *  Resolved [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/)
 * Hello,
    I have implemented the Quantcast policy, but in the reader version of
   AMP it is not displayed. How should I solve this problem? Are there widgets that
   Automattic AMP also reports in the amp version of the link?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fquantcast-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13301583)
 * How did you implement Quantcast policy for non-AMP? I’m not familiar with that
   that is.
    -  This reply was modified 5 years, 9 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13301678)
 * I simply pasted the tag created by Quantcast.com into the body of my theme.
 * Non-AMPs get the consent message, AMPs don’t.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13301724)
 * What code did you paste exactly?
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13303037)
 * So, the code received by Quantcast is the following:
 * <!– Quantcast Choice. Consent Manager Tag v2.0 (for TCF 2.0) –>
    <script type
   =”text/javascript” async=true> (function() { var host = window.location.hostname;
   var element = document.createElement(‘script’); var firstScript = document.getElementsByTagName(‘
   script’)[0]; var url = ‘[https://quantcast.mgr.consensu.org&#8217](https://quantcast.mgr.consensu.org&#8217);.
   concat(‘/choice/’, ‘my code’, ‘/’, host, ‘/choice.js’) var uspTries = 0; var 
   uspTriesLimit = 3; element.async = true; element.type = ‘text/javascript’; element.
   src = url;
 *  firstScript.parentNode.insertBefore(element, firstScript);
 *  function makeStub() {
    var TCF_LOCATOR_NAME = ‘__tcfapiLocator’; var queue =[];
   var win = window; var cmpFrame;
 *  function addFrame() {
    var doc = win.document; var otherCMP = !!(win.frames[
   TCF_LOCATOR_NAME]);
 *  if (!otherCMP) {
    if (doc.body) { var iframe = doc.createElement(‘iframe’);
 *  iframe.style.cssText = ‘display:none’;
    iframe.name = TCF_LOCATOR_NAME; doc.
   body.appendChild(iframe); } else { setTimeout(addFrame, 5); } } return !otherCMP;}
 *  function tcfAPIHandler() {
    var gdprApplies; var args = arguments;
 *  if (!args.length) {
    return queue; } else if (args[0] === ‘setGdprApplies’) {
   if ( args.length > 3 && args[2] === 2 && typeof args[3] === ‘boolean’ ) { gdprApplies
   = args[3]; if (typeof args[2] === ‘function’) { args[2](‘set’, true); } } } else
   if (args[0] === ‘ping’) { var retr = { gdprApplies: gdprApplies, cmpLoaded: false,
   cmpStatus: ‘stub’ };
 *  if (typeof args[2] === ‘function’) {
    args[2](retr); } } else { queue.push(args);}}
 *  function postMessageEventHandler(event) {
    var msgIsString = typeof event.data
   === ‘string’; var json = {};
 *  try {
    if (msgIsString) { json = JSON.parse(event.data); } else { json = event.
   data; } } catch (ignore) {}
 *  var payload = json.__tcfapiCall;
 *  if (payload) {
    window.__tcfapi( payload.command, payload.version, function(
   retValue, success) { var returnMsg = { __tcfapiReturn: { returnValue: retValue,
   success: success, callId: payload.callId } }; if (msgIsString) { returnMsg = 
   JSON.stringify(returnMsg); } event.source.postMessage(returnMsg, ‘*’); }, payload.
   parameter ); } }
 *  while (win) {
    try { if (win.frames[TCF_LOCATOR_NAME]) { cmpFrame = win; break;}}
   catch (ignore) {}
 *  if (win === window.top) {
    break; } win = win.parent; } if (!cmpFrame) { addFrame();
   win.__tcfapi = tcfAPIHandler; win.addEventListener(‘message’, postMessageEventHandler,
   false); } };
 *  makeStub();
 *  var uspStubFunction = function() {
    var arg = arguments; if (typeof window.__uspapi!
   == uspStubFunction) { setTimeout(function() { if (typeof window.__uspapi !== ‘
   undefined’) { window.__uspapi.apply(window.__uspapi, arg); } }, 500); } };
 *  var checkIfUspIsReady = function() {
    uspTries++; if (window.__uspapi === uspStubFunction&&
   uspTries < uspTriesLimit) { console.warn(‘USP is not accessible’); } else { clearInterval(
   uspInterval); } };
 *  if (typeof window.__uspapi === ‘undefined’) {
    window.__uspapi = uspStubFunction;
   var uspInterval = setInterval(checkIfUspIsReady, 6000); } })(); </script> <!–
   End Quantcast Choice. Consent Manager Tag v2.0 (for TCF 2.0) –>
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13305989)
 * That code will not work in AMP because it involves custom JS which is not allowed
   in AMP. Any custom such JS is stripped out by the AMP plugin to ensure AMP validity.
 * In looking at the [Quantcast docs](https://help.quantcast.com/hc/en-us/articles/360048696153-User-FAQ-for-Quantcast-Choice-on-TCF-v2-0-),
   they say that AMP is not supported for this reason:
 * > **Does Quantcast Choice work with Google AMP?**
   >  We do not support Google AMP
   > at this time. Google AMP pages do not support Javascript which is needed for
   > a CMP with granular user preferences like Choice.
   > AMP also does not support the IAB TCF v2.0 at this point, and therefore we 
   > recommend you speak to your Google representative to find out the best way 
   > to gather consent in AMP pages.
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13305998)
 * Ah understood.
    What solution do you suggest to integrate the cookie solution
   into your plug-in?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13306052)
 * For like GDPR consent? There’s this plugin: [https://wordpress.org/plugins/wp-gdpr-cookie-notice/](https://wordpress.org/plugins/wp-gdpr-cookie-notice/)
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13307235)
 * I installed the recommended plugin, but at the moment I still don’t see the cookie
   solution on AMP pages.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13307435)
 * You don’t see consent banners as depicted in that plugin’s screenshots?
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13307796)
 * Of course I see them, but only in the non-AMP version of the site. You can check
   if you want one of my AMP pages.
    I followed all the plug-in instructions.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13307804)
 * Sorry, I’m not sure. I see the consent notice on one such site that uses the 
   plugin: [https://felix-arntz.me/](https://felix-arntz.me/)
 * You may need to open a support topic regarding the issue. It could be that the
   plugin isn’t specifically supporting Reader mode yet.
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13307860)
 * I also thought that the problem could have been the reader mode, I try to open
   a support topic on the homepage of the site. Thank you
 *  Thread Starter [universalmovies](https://wordpress.org/support/users/universalmovies/)
 * (@universalmovies)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13307862)
 * obviously update you
 *  [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13459348)
 * Quantcast says that AMP does not support the IAB TCF v2.0, so it seems that you
   can’t put the Quantcast CMP in AMP pages
 * **Does Quantcast Choice work with Google AMP?**
    [https://help.quantcast.com/hc/en-us/articles/360048696153-User-FAQ-for-Quantcast-Choice-on-TCF-v2-0-#h_781aa748-8682-478a-9ebd-4a7cf4e0ee37](https://help.quantcast.com/hc/en-us/articles/360048696153-User-FAQ-for-Quantcast-Choice-on-TCF-v2-0-#h_781aa748-8682-478a-9ebd-4a7cf4e0ee37)

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Quantcast’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [cookie](https://wordpress.org/support/topic-tag/cookie/)
 * [policy](https://wordpress.org/support/topic-tag/policy/)
 * [quantcast](https://wordpress.org/support/topic-tag/quantcast/)

 * 14 replies
 * 3 participants
 * Last reply from: [DrLightman](https://wordpress.org/support/users/drlightman/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/quantcast-2/#post-13459348)
 * Status: resolved