• Plugin Contributor Ryan

    (@rbaronqc)


    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 (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 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 to prevent tags from firing until consent is established.

    • This topic was modified 4 years, 3 months ago by Ryan.
    • This topic was modified 4 years, 3 months ago by Ryan.
Viewing 15 replies - 1 through 15 (of 81 total)
  • Plugin Contributor Ryan

    (@rbaronqc)

    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

    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.micurodame.it/choice.js

    Is there a way to fix this issue?

    Thank you

    Plugin Contributor Ryan

    (@rbaronqc)

    @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 https://www.micurodame.it 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 account:
    https://www.torrinomedica.it (including the www)
    https://www.micurodame.it (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 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 4 years, 3 months ago by Ryan.
    • This reply was modified 4 years, 3 months ago by Ryan.
    • This reply was modified 4 years, 3 months ago by Ryan.

    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

    (@rbaronqc)

    @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 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, select the edit “pencil icon” for your site and apply your new theme.

    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!

    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 https://www.delinquentidelpallone.it if anyone can please check, i don’t know how to fix it from here.

    Plugin Contributor Ryan

    (@rbaronqc)

    @vsharmilee @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.

    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) 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

    (@rbaronqc)

    @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 4 years, 3 months ago by Ryan.

    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

    Thanks @rbaronqc !
    @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?

    @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.

    @rbaronqc : I am not getting the cookie consent popup in my website even after activating Quantcast plugin.Kindly advise.

    Plugin Contributor Ryan

    (@rbaronqc)

    Hi @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)
  • The topic ‘Google Error Code 2.1a’ is closed to new replies.