Find out what Google AdSense needs beyond the cookie consent banner
Tagging Google AdSense with targeting holds back the ads by default until the visitor accepts, but it does not unlock personalized ads in the EEA, the UK, and Switzerland. Google requires a certified consent management platform (CMP) that writes an IAB Transparency and Consent Framework (TCF) string for those ads. TermsFeed Free Cookie Consent does not write a TCF string and is not certified by Google. Decide how to show Google ads to visitors in those regions.
What tagging the AdSense script achieves
By default, a tagged AdSense script does not send a request or set an ad cookie until the visitor accepts the targeting category. Cookie Consent holds the AdSense loader and the push script of each ad unit as tagged scripts. The scripts run after the visitor clicks the "I agree" button or saves a Preferences Center choice that accepts targeting. They run again on every later page load of that visitor. Google does not receive a request from a visitor who declines, so that visitor sees empty ad slots and you earn nothing from the visit.
Tagging the AdSense scripts serves the part of the ePrivacy Directive rule that asks for consent before anything is stored on or read from the device. Tag the AdSense loader and every ad unit script with targeting, following the rules in Block Scripts Until Consent.
The checks assume express consent with page_load_consent_levels left out or at the generator value ["strictly-necessary"]. Check the tagged AdSense script on your own page.
- Publish your tags and clear any page cache, then close every private window, open a new one, and open Chrome DevTools before you load the page.
- Filter the Network tab for
pagead2.googlesyndication.com, load the page, and confirm that no request appears. - Click the "I agree" button and confirm that
adsbygoogle.jsloads.
What tagging AdSense does not achieve
Tagging decides whether AdSense loads, but Google still learns nothing about what the visitor consented to. The IAB TCF is a standard run by IAB Europe. It encodes what each visitor consents to, for each ad vendor and purpose, in a TC string, which ad scripts read through a function named __tcfapi. Cookie Consent does not provide a __tcfapi function or write a Global Privacy Platform (GPP) string.
Google set the rule for its publisher products in its help page on the certified CMP requirement. A certified CMP integrated with the TCF has been required for personalized ads in the EEA and the UK since 16 January 2024, and in Switzerland since 31 July 2024. Google states that "Traffic from a non-certified CMP may be eligible for non-personalized ads or limited ads" where supported.
A Google Consent Mode update that your callback sends for Google Analytics or Google Ads is a separate system and produces no TC string. Set it up for those tags with Set Up Google Consent Mode v2.
Options for Google ads in the EEA, the UK, and Switzerland with Cookie Consent
Pick 1 of 2 options, knowing that Cookie Consent shows the same consent banner to every visitor. In express mode with the default page_load_consent_levels, the tagged AdSense script waits for the visitor to accept targeting in every region, not only the EEA, the UK, and Switzerland.
Both options keep a single consent prompt on the page. A second consent system on the page conflicts with Cookie Consent: the 2 systems ask visitors the same question twice, and neither reads the answer given to the other.
Option 1: Replace Cookie Consent with a Google-certified CMP
A certified CMP asks for consent and writes the TC string AdSense reads, which makes visitors who consent eligible for personalized ads. Google names its own European regulations message in the "Privacy & messaging" tab of AdSense as certified, and the help page for the requirement lists the other certified CMPs. Pick a CMP that holds your other scripts as well, such as analytics and embeds, because it replaces Cookie Consent on every page.
Remove the Cookie Consent code when the new CMP goes live, and move each tagged script to the blocking method the new CMP documents. Find and remove a leftover second consent banner with 2 Cookie Banners Appear on Your Site.
Option 2: Keep Cookie Consent and accept limited ads
Keep the tagged AdSense script and accept that visitors in the EEA, the UK, and Switzerland get at most non-personalized or limited ads. Visitors who accept targeting load AdSense with no TC string. Google attempts to serve an eligible limited ad to such requests, according to its help page on limited ads.
This option keeps a single configuration in your code. It suits a site that earns little from ads in those regions.
Check what ad networks other than Google require
Many programmatic ad networks read a TC string to decide what they serve to visitors in the EEA, the UK, and Switzerland. Before you rely on Cookie Consent for such a network, ask it in writing whether it requires a TC string or a certified CMP for that traffic. Ask too what it serves to a visitor whose page does not carry a TC string. Tag the network script with targeting, so that, like the AdSense script, it waits for consent by default. Follow the steps in How to Tag a Tool That Is Not Listed.