Google AdSense enables monetization of website visits by displaying ads from Google's advertiser network.
These ads are personalized based on user interests, necessitating active user consent for such codes.
Learn how to install GDPR-compliant Google AdSense on your website with MyAgilePrivacy.
Solution 1 - automatic scan
Utilize the advanced "Cookie Shield" feature, which automatically detects this software.
Set the Shield to "Learning" mode, browse your site's pages, and your configuration will be ready.
Alternatively, manual configuration is available.
Solution 2 - manual configuration
Part 1 - the code of Google AdSense
Signing up for Google AdSense provides you with a javascript code to place on your website.
The code should look like this:
Part 2 - Locating the Cookie for Google AdSense on the MyAgilePrivacy Cookie List
In your WordPress website admin, navigate to: MyAgilePrivacy -> Cookie List from the left menu.
Here, you'll find the list of cookies imported upon plugin installation.
Initially, they'll all be in a draft state. Your task is to publish only the cookies relevant to your website.
On this screen you will see a series of columns:
- Cookie Name: the name of the Cookie
- Is Necessary: indicates whether or not the cookie is essential to site navigation. If rejecting the cookie makes the site unusable, then it is essential. You will find this information pre-filled in the cookie details.
- Auto Update: indicates whether the cookie reference text (which we will see in a moment) remains automatically updated or not. If the setting is on "yes," we will automatically take care of updating the cookie reference texts to keep everything up to date according to GDPR regulations.
- Installation Type: tells you the insertion type chosen for the cookie. This value will be changed depending on the type of inclusion needed, and we will see this together within the guides.
To install the Google AdSense cookie, locate the entry titled "Google AdSense (Google Inc.)" in the list and click on it.
On the detail page, you'll find pre-filled informational text and two blank fields where the code can be entered. This pre-filled text is visible in the cookie policy and is automatically updated to remain compliant when the "Allow Automatic Update" setting is set to "yes."
Just below the text, you'll see the option to select the "Type of Installation" (Javascript and Noscript, or Raw).
Choose "Raw Code" from the dropdown, and you'll see a field labeled "raw html code.".
Part 3 - Entering Google AdSense Code
What's left for you to do is to take the Google AdSense code and enter it as is inside the "Raw Html Code" field.
Remember to save and publish the Cookie by pressing the blue "Publish" button in the upper right corner.
Final part - verification of proper operation
To verify the correct inclusion of Google AdSense, observe the ads you've set on the Google AdSense management panel.
These ads will only appear after you explicitly enable the Google AdSense-related cookie.
You can do this by clicking "I agree" on the cookie acceptance bar or by navigating to "Customize" and enabling the cookie in the MyAgilePrivacy Cookie bar on your site.
Attention
For Adsense network advertisers, the use of TCF 2.2 features is mandatory, under penalty of exclusion from monetization. Learn more here.