Title: Google Error Code 2.1a
Last modified: August 15, 2020

---

# Google Error Code 2.1a

 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/)
 * This topic is intended to help anyone address Google 2.1a errors.
 * **2.1a – If you are seeing this error code it is likely that you are loading 
   Google tags before receiving are response form Choice with the users consent 
   string and you will likely have to make some updates to prevent your tag from
   loading before Consent is known.**
 * I created a video here [https://vimeo.com/448116970/4d24c9edc9](https://vimeo.com/448116970/4d24c9edc9)(
   apologies for the slow/jerky load in the video here, running over a VPN) which
   demonstrates expected behavior that shows ad tags that wait for consent to be
   established on page load before being added to the page. On subsequent page loads(
   user consent is saved) Choice popup will not show and ads will load using consent
   set in the previous Choice popup interaction.
 * To **test**, in an incognito window, open your site to a page with ads. When 
   you visit the page you should see Choice (i.e. consent has not been established
   as this is a first visit in incognito mode). At this point you should not see
   ads attempting in load in the background. You should not see any ads load/attempt
   to load. Once you agree and close the Choice popup all of you ads should begin
   to load without 2.1a issues.
 * Solving 2.1a issues can be a rather difficult problem to solve due to the number
   of different ways tags can be added to websites. We are working to provide more
   detailed guides & examples to help you solve this error depending upon your setup.
 * Quantcast Choice Plugin & Google Tag Manager:
    – 1. Adding Choice with the WordPress
   plugin and using the “send consent signals to the data layer” plugin option. –
   2. Adding other third party tags with Google Tag Manager after reading consent
   signals from the data layer. If you implement the IAB Consent and Non-IAB Consent
   variables from this guide here [https://help.quantcast.com/hc/en-us/articles/360052555693](https://help.quantcast.com/hc/en-us/articles/360052555693)
   you can now read the consent data, in GTM, that was passed to the data layer 
   by Quantcast Choice and use those consent signals in GTM to create trigger events&
   trigger groups as shown here: [https://help.quantcast.com/hc/en-us/articles/360051794434-TCF-v2-GTM-Implementation-Guide-IAB-Vendor-Tag-Blocking](https://help.quantcast.com/hc/en-us/articles/360051794434-TCF-v2-GTM-Implementation-Guide-IAB-Vendor-Tag-Blocking)
   to prevent tags from firing until consent is established.
    -  This topic was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).
    -  This topic was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).

Viewing 15 replies - 1 through 15 (of 81 total)

1 [2](https://wordpress.org/support/topic/google-error-code-2-1a/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/google-error-code-2-1a/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/google-error-code-2-1a/page/4/?output_format=md)
[5](https://wordpress.org/support/topic/google-error-code-2-1a/page/5/?output_format=md)
[6](https://wordpress.org/support/topic/google-error-code-2-1a/page/6/?output_format=md)
[→](https://wordpress.org/support/topic/google-error-code-2-1a/page/2/?output_format=md)

 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13261959)
 * Quantcast has cataloged the error codes, reasons they arise with Choice and ways
   to address them here: [https://help.quantcast.com/hc/en-us/articles/360052292554-Google-IAB-TCF-v2-Error-Codes-Guidance](https://help.quantcast.com/hc/en-us/articles/360052292554-Google-IAB-TCF-v2-Error-Codes-Guidance)
 *  [sanmag](https://wordpress.org/support/users/sanmag/)
 * (@sanmag)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13262945)
 * Hi, I get the 2.1 error form Google because server responded with error 403:
 * Failed to load resource: the server responded with a status of 403 ()
 * This are the real URI calls that fails:
 * [https://quantcast.mgr.consensu.org/choice/xTTqAJEm-VSq_/www.torrinomedica.it/choice.js](https://quantcast.mgr.consensu.org/choice/xTTqAJEm-VSq_/www.torrinomedica.it/choice.js)
   
   [https://quantcast.mgr.consensu.org/choice/xTTqAJEm-VSq_/www.micurodame.it/choice.js](https://quantcast.mgr.consensu.org/choice/xTTqAJEm-VSq_/www.micurodame.it/choice.js)
 * Is there a way to fix this issue?
 * Thank you
 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13263023)
 * [@sanmag](https://wordpress.org/support/users/sanmag/) I have spotted the issue.
   You force all traffic to non-www, which is totally fine, however when I print
   out the browser `window.location` in the browser dev console I get the following
   information:
    Location `{href: "https://www.micurodame.it/", ancestorOrigins:
   DOMStringList, origin: "https://www.micurodame.it", protocol: <strong>"https:",
   host: "www.micurodame.it"</strong>, …}`. which has a host value of [http://www.micurodame.it](https://wordpress.org/support/topic/google-error-code-2-1a/?output_format=md#)
   with the **www** value. The quantcast choice tag is checking your host value 
   and comparing that with the url you added via the Choice admin panel. The best
   solution, and the one that should be made is to update your server configuration
   so the that your host value (window.location.host) matches the url you force 
   traffic to. Until you an make that server update a short term fix, that may work,
   would be to add 2 more websites to your [https://www.quantcast.com/protect/sites](https://www.quantcast.com/protect/sites)
   account: – [http://www.torrinomedica.it](https://wordpress.org/support/topic/google-error-code-2-1a/?output_format=md#)(
   including the www) – [http://www.micurodame.it](https://wordpress.org/support/topic/google-error-code-2-1a/?output_format=md#)(
   including www)
 * I don’t know for sure if this will work, there could be additional host/url mismatch
   problems that arise.
 * As you can see from the url here [https://quantcast.mgr.consensu.org/choice/xTTqAJEm-VSq_/micurodame.it/choice.js](https://quantcast.mgr.consensu.org/choice/xTTqAJEm-VSq_/micurodame.it/choice.js)
   your config lives under the non www because that is what you added to qc.com 
   and and that is what you force web traffic to, but the value of `window.location.
   host` in the browser developer console includes the www. Choice reads the value
   of `window.location.host` to determine where to look for the config file.
    -  This reply was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).
    -  This reply was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).
    -  This reply was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).
 *  [sanmag](https://wordpress.org/support/users/sanmag/)
 * (@sanmag)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13263212)
 * You’re the best rbaronqc !! Thank you for your help: all solved!
    A last question
   then I won’t bother you anymore: I’m getting the privacy popup text in english
   also if I setted Italy as country. Is there a way to localize the alert? Thank
   you again
 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264059)
 * [@sanmag](https://wordpress.org/support/users/sanmag/) Yes, we support multiple
   languages, I believe we all of the default privacy messaging translated to 17
   different languages. I thought the default behavior is to autodetect the visitors
   browser language, but maybe you have to select that. Can you create a custom 
   theme here [https://www.quantcast.com/protect/themes](https://www.quantcast.com/protect/themes)
   and under in the Customize UI section make sure the CMP UI LANGUAGE field is 
   set to “Autodetect language”. One your new theme is created head over to [https://www.quantcast.com/protect/sites](https://www.quantcast.com/protect/sites),
   select the edit “pencil icon” for your site and apply your new theme.
 *  [vsharmilee](https://wordpress.org/support/users/vsharmilee/)
 * (@vsharmilee)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264140)
 * Hi,
    The given solution is for those who use google tag manager(GTM) but I use
   ad inserter plugin for adding ads.I am facing the same 2.1a and 1.1 errors.Could
   you please check and let me know how to solve these errors? This is my website:
   www.sharmispassions.com Kindly help!
 *  [lenoop01](https://wordpress.org/support/users/lenoop01/)
 * (@lenoop01)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264382)
 * Hello,
    i have the same problem, i am seeing the error 2.1a in adsense.
 * I’m using the quantcast choice wordpress plugin, flagged the Push IAB & Non-IAB
   consent data to the Data Layer on, but still seeing the error on adsense. If 
   I analyze it with firefox I get a 403 error on noniab-vendorlist.json
 * Website [http://www.delinquentidelpallone.it](http://www.delinquentidelpallone.it)
   if anyone can please check, i don’t know how to fix it from here.
 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264438)
 * [@vsharmilee](https://wordpress.org/support/users/vsharmilee/) [@lenoop01](https://wordpress.org/support/users/lenoop01/)
   the 403 error on the non-iab vendor list is not causing the 2.1a error in any
   way. It just means you don’t have any custom non iab vendors added. Ill look 
   into checking for that to exist before making the call to prevent the 403 error
   in this case.
 * The 2.1a error means you are loading Google tags onto your site before you have
   user consent. I don’t know how you are adding adsense to your website, but it
   is very likely the the method you are using is NOT waiting for consent before
   adding the tags to the website. If you’re using a WordPress plugin to add Google
   tags to your site it is very likely this plugin is not waiting for consent before
   adding the Google tag (error 2.1a). You may need to contact the plugin (that 
   is adding your google tag) and ask them how to wait for consent before adding
   the google tags with their plugin. I think some plugins may have to adjust when
   and how they drop google tags, checking/waiting for consent first.
 * **The Choice plugin cannot stop other plugins from adding tags to a site (no 
   plugin can)**, instead it **collects and saves consent** data and **makes it 
   accessible so that others can read it** and make decisions based consents provided
   by users. In this case **plugins that add Google Tags to your site have to wait
   for consent and read that data before adding tags**. If plugins add tags before
   consent is established you will get a 2.1a error. **Quantcast Choice cannot stop
   them from adding tags**, hence the errors. We can only provide the consent signals/
   choices, that data still needs to be acted upon in this case. It is likely those
   plugins need to adjust and make sure they wait for consent to be established 
   before adding tags to your site.
    -  This reply was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).
    -  This reply was modified 5 years, 9 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  [vsharmilee](https://wordpress.org/support/users/vsharmilee/)
 * (@vsharmilee)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264548)
 * Thanks for your response.
    I get that the plugin we use to add ads is not waiting
   for consent.So should installing google tag manager and following the steps for
   setting it up as below ([https://help.quantcast.com/hc/en-us/articles/360051794134-Quantcast-Choice-TCFv2-Google-Tag-Manager-GTM-Implementation-Guide#h_01EEVBK4AENH0F5YPKHXH70PXX?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=datalayer-triggers&utm_content=choice](https://help.quantcast.com/hc/en-us/articles/360051794134-Quantcast-Choice-TCFv2-Google-Tag-Manager-GTM-Implementation-Guide#h_01EEVBK4AENH0F5YPKHXH70PXX?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=datalayer-triggers&utm_content=choice))
   will solve this 2.1a error?
 * Once GTM configuration with Quantcast is completed, will my existing ‘ad inserter’
   plugin fire the ads only after the user consent choice?
 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264609)
 * [@vsharmilee](https://wordpress.org/support/users/vsharmilee/) yes if follow 
   the GTM setup guide you can then create triggers events/groups (the last section
   of the guide) and use those to add your tags only after consent is established.
 * You may also want to try contacting the plugin author for your existing “ad inserter”
   plugin. They may have already made updates that just require additional configuration
   and ask if there are additional steps you need to take to wait for consent before
   the plugin drops tags or if they are currently working on a update to wait for
   tcf v2.0 consent signals before dropping tags. I have already been speaking with
   one plugin author today helping them to update to wait for consent before dropping
   tags, and we are happy to work with more plugins to help them make sure they 
   wait for consent before adding tags.
    -  This reply was modified 5 years, 9 months ago by [Ryan](https://wordpress.org/support/users/rbaronqc/).
 *  [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264612)
 * Hello,
 * I am the author of Ad Inserter plugin.
    Ad Inserter supports IAB Transparency
   and Consent Framework 2.0 used by Quantcast Choice.
 * Maybe this can help you:
    [https://adinserter.pro/faq/gdpr-compliance-cookies-consent](https://adinserter.pro/faq/gdpr-compliance-cookies-consent)
 *  [vsharmilee](https://wordpress.org/support/users/vsharmilee/)
 * (@vsharmilee)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264642)
 * Thanks [@rbaronqc](https://wordpress.org/support/users/rbaronqc/) !
    [@spacetime](https://wordpress.org/support/users/spacetime/):
   I have configured quantcast and using ad inserter for my ads insertion(except
   for my header ad and primary sidebar I am using wordpress theme widget). However
   am still getting the 2.1a error? In addition to this should I install any of 
   the mentioned Cookie consent plugin?
 *  [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264676)
 * [@vsharmilee](https://wordpress.org/support/users/vsharmilee/)
 * No, if you are using Quantcast Choice then this is what you need – to get consent
   from the users.
    Ad Inserter can check (encoded) Quantcast Choice cookie values
   and insert ad codes only when the consent is given. Of course, you would need
   to configure the right value to check.
 * I can only help you with Ad Inserter, I can’t help with other errors.
 *  [vsharmilee](https://wordpress.org/support/users/vsharmilee/)
 * (@vsharmilee)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264687)
 * [@rbaronqc](https://wordpress.org/support/users/rbaronqc/) : I am not getting
   the cookie consent popup in my website even after activating Quantcast plugin.
   Kindly advise.
 *  Plugin Contributor [Ryan](https://wordpress.org/support/users/rbaronqc/)
 * (@rbaronqc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/#post-13264706)
 * Hi [@spacetime](https://wordpress.org/support/users/spacetime/), nice to e-meet
   you. I hope you are having a good weekend, probably a bit busy like mine 🙂 I
   believe we are setting all of the tcData values correctly for TCF v2.0 compliance.
   Is there any chance you could be checking for cookie values before the user responded
   with consent, outside of `window.__tcfapi('addEventListener', 2, function(tcData,
   listenerSuccess) {});` all user consent responses should be present in the tcData
   if the listener call returns successful.

Viewing 15 replies - 1 through 15 (of 81 total)

1 [2](https://wordpress.org/support/topic/google-error-code-2-1a/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/google-error-code-2-1a/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/google-error-code-2-1a/page/4/?output_format=md)
[5](https://wordpress.org/support/topic/google-error-code-2-1a/page/5/?output_format=md)
[6](https://wordpress.org/support/topic/google-error-code-2-1a/page/6/?output_format=md)
[→](https://wordpress.org/support/topic/google-error-code-2-1a/page/2/?output_format=md)

The topic ‘Google Error Code 2.1a’ is closed to new replies.

 * ![](https://ps.w.org/quantcast-choice/assets/icon-256x256.png?rev=1879905)
 * [Quantcast Choice](https://wordpress.org/plugins/quantcast-choice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quantcast-choice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quantcast-choice/)
 * [Active Topics](https://wordpress.org/support/plugin/quantcast-choice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quantcast-choice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quantcast-choice/reviews/)

 * 81 replies
 * 19 participants
 * Last reply from: [blueann](https://wordpress.org/support/users/blueann/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/google-error-code-2-1a/page/6/#post-13646353)
 * Status: not a support question