Integrating AdSense and other ads with Quantcast Choice in WordPress
Quantcast Choice is a service that helps you comply with the European General Data Protection Regulation (GDPR) and show ads or any other services that process user data only after the visitors to your website gave their consent.
While Quantcast is an official Consent Management Platform (CMP) that gathers and stores the consent. It is up to you to honor the choice made by your visitors. Quantcast or any other CMP itself has little influence on how and when your website loads tracking scripts or ads from Google AdSense, Google Ad Manager, or other ad networks.
Example of a TCF-compliant consent dialog from Quantcast Choice
In this tutorial, I will show you how to set up a Quantcast Choice account, which options to choose when displaying Google AdSense, and how to implement AdSense codes to comply with the privacy regulations. You don’t need to have any coding knowledge to follow these steps.
Setting up Quantcast Choice for AdSense
Contents
Quantcast Choice is free, and creating the account is simple.
Just head over to their website, and look for a button to sign up for Quantcast Choice.
Once you completed the signup process, log in to your account, and go to “Privacy”. Now click on the “Protect a site” button. I have found the following information useful when adding my website:
- The URL should not include any subdirectories, e.g., example.com is ok, but example.com/blog is not.
- Go with the default theme for now. You can customize your own later, but one of the benefits of Quantcast Choice is their nice-looking default theme.
- Regulation: go with GDPR for now. We will cover the CCPA in another tutorial.
- CMP version: always use the latest version, especially for new sites
Quantcast Consent Scope
The Consent scope box needs a bit more explanation.
Which users should be asked for consent?
If your company is registered in the EEA (EU plus a few other European countries) or the UK, you need to ask any visitor for their consent, regardless of their location. Websites outside of that region only need to ask any visitor from within that area for their consent. So for European companies, “Everyone” is the choice here.
Consent scope: Ask user for consent for…
Choose “Your site only” for now. If you are a small publisher, choose that option for all of your sites and keep your life simpler. Larger publishers with networks of sites could look into the other available choices later.
Non-consent redirect URL
When given, this option allows you to redirect users to another URL when they don’t give any consent. They will not have a chance to see your content at all.
I would personally not redirect visitors away from my site unless there is a fundamental reason. If your consent rates are low, try to tweak the consent form’s layout to increase it. Some CMPs report acceptance rates over 90% on desktop.
Show new vendors every…
Whenever you add a vendor, e.g., a new ad network or tracking service, you would need to ask visitors for their consent again. Choose here how often you want to do that.
Your Consent Configuration
The safe option here is, “I don’t declare a legal basis for my property.” You can look into the other options if you have legal advice on your site.
Google Vendors
Check this box if you are using Google Ad Manager or Google AdSense with Quantcast Choice. It will make sure that there is enough competition in your ads and click prices might be higher.
Click on Save Changes at the top of the page to add your website to your Quantcast Choice account.
Activate this option if you are using Quantcast Choice with Google AdSense or Google Ad Manager
Vendors
If AdSense is the only external ad network you are using, you can ignore the following information.
A vendor regarding the IAB is a company in the ad business that registered with them for a yearly fee. The vendor list in Quantcast Choice includes many known brands, e.g., Google or media.net. You can block some of them from showing up in the consent message on your site, but I would not recommend doing that unless you know exactly why.
If you want to include vendors that are not registered with the IAB, then open the Non-IAB Vendors option and add them. This could include any non-ad-related services like A/B testing tools, analytics, or even embedded newsletter signup forms. Reach out to them if you want to be sure.
Adding Quantcast Choice to your website
Now that you added your site to your Quantcast Choice account, you still need to add their code to your website.
In your Quantcast Choice account, look for the “Universal Tag” button on the overview page. Click on it and choose “Copy Tag.”
You can use Advanced Ads to add that code to the appropriate section on your site. Now head over to your WordPress backend.
- First, enable the Privacy module under Advanced Ads > Settings > Privacy and choose “TCF 2.0 integration”.
- Go to Advanced Ads > Ads and click on “New Ad”.
- Choose “Plain text and code” as the ad type and insert the code you just copied into the Ad Parameters.
You can leave all the other parameters untouched and save the ad by clicking on “Publish”.
- Go to the Ad Parameters section and enable the “Ignore general Privacy settings” so that the Privacy module does not block this particular code.
- Now go to Advanced Ads > Placements and create a new “Head” placement.
- If you are using Advanced Ads Pro with cache-busting, disable the cache-busting option for the placement by setting it to “off”
- Assign the just created ad to it and save the placement.
The Quantcast Choice code is now correctly added to your site.
Load AdSense only when users give their consent
The next step is the most simple. If you already integrated your (AdSense) ads with Advanced Ads, then they will only be loaded when the users give their consent.
Your users can also pick specific consents and reject individual ad partners. Google Ad Manager, AdSense, or any other ad network that works with the TCF 2.0 standard will automatically detect these choices and serve (or not serve) ads appropriately.
Since image ads don’t load external scripts, they will also be served without consent. You can also exclude any other individual ad from needing consent. This is appropriate if a Plain text ad only contains HTML without calling any scripts.
Once the users give their consent, AdSense ads show up after the next page reload or, if Advanced Ads Pro is installed, right away.
Troubleshooting
When you followed our tutorial to implement the Quantcast Choice code using Advanced Ads and it is not showing up then take a look into the browser console. If the call to their server returns a 403 error then you might have configured the URL wrong in your Quantcast account. It needs to match your URL, including (or not including) www.
Conclusions
Quantcast has made it easy for publishers to take a big step towards compliance with data protection laws, especially if you monetize your website with ads.
Advanced Ads integrates seamlessly with Quantcast Choice and other TCF 2.0 registered CMPs to deliver ads from AdSense or any other ad network only after consent was given. The whole process of adding the CMP’s code to your site and connecting it with your ads just takes a few minutes.
Check out the following resources if you are looking for further information or try to debug an issue with Quantcast Choice.
Starting in 2009, Thomas’ own word game website grew to 40 MM page impressions per month. He then built Advanced Ads to help his colleagues to place ads and test different ad positions and networks tests without any coding skills. Thomas now enjoys improving the product for our more than 150,000 users worldwide.