Documentation

Table of Contents

How to Collect Consent for Google Ad Personalization

In order to comply with Google’s updated EU Consent policy, publishers wishing to run personalized ads via Google services like Adsense are required to ensure that explicit consent to ad personalization is collected before displaying personalized ads for end-users based in the EAA (European Union member states and Iceland, Liechtenstein, and Norway).

Please note that where this requirement is not met (where consent is not collected for the personalization of ads), Google will serve your EEA end-users with non-personalized ads by default, potentially impacting your ad revenue.

What you need to do

To meet this requirement, you must give users the opportunity to consent to or reject processing for Google’s ad personalization. The Cookie Solution’s IAB Advertising Preferences Management setting makes this process fairly easy.

Attend our “Consent management for publishers” webinar

View a live demo and have your questions answered in real time by attending our free english “Consent management for publishers” webinar. Discover in practice how you can meet both compliance and advertising industry requirements while ensuring that your ad-reach is maximized.

Sign up now

Setup

First, ensure that you’ve enabled the Cookie Solution’s IAB Advertising Preferences Management option as explained here (you can enable this feature also on Cookie Solution > Edit).

Cookie Solution's IAB Advertising Preferences Management option

Please note that the “Request new consent” option must be enabled. You can do this by going to Cookie Solution > Edit > Advanced View and selecting the relevant setting under IAB Transparency and Consent Framework section.

IAB Framework - Request new consent

Finally, make sure to enable the “Google’s ad preference management” option (available on both basic and advanced view):

Cookie Solution - Google's ad preference management

You’ll get a code snippet like this:

<script type="text/javascript" src="//cdn.iubenda.com/cs/tcf/stub.js"></script>
<script type="text/javascript">
    var _iub = _iub || [];
    _iub.csConfiguration = {
        "lang": "en",
        "siteId": XXXXXX, //use your siteId
        "cookiePolicyId": YYYYYY, //use your cookiePolicyId
        "enableCMP": true,
        "googleAdsPreferenceManagement": true,
        "banner": {
            "position": "float-top-center",
            "acceptButtonDisplay": true,
            "customizeButtonDisplay": true
        }
    };
</script>
<script type="text/javascript" src="//cdn.iubenda.com/cs/iubenda_cs.js" charset="UTF-8" async></script>
Caution

In order to complete the installation of these settings, please ensure that you have the latest version of the code snippet embedded on your site header.

When this setting is enabled, end-users will see an additional “Google toggle” that allows them to choose between personalized or non-personalized Google ads as required.

Google toggle that allows users to choose between personalized or non-personalized Google ads

Implementation

Now, to ensure that non-personalized ads are sent when indicated by the user, you’ll need to modify your Google scripts using the following:

_iub.cs.api.isGoogleNonPersonalizedAds()

The value is set to true where consent has not been given and false where it has been given.

The function is valorized after the consent has been given.

Please note that these instructions assume that you’ve previously set up prior-blocking for these Google services and have therefore modified the scripts as referenced below.

If you’ve instead set-up prior blocking of these scripts using Google features, jump to this section.

For Google Publisher Tag

In your Publisher Tag embed code, insert the following code snippet

<script type="text/plain" class="_iub_cs_activate">
    googletag.cmd.push(function () {
        googletag.pubads().setRequestNonPersonalizedAds(_iub.cs.api.isGoogleNonPersonalizedAds() ? 1 : 0); 
    });
</script>

between lines 16 and 17 of the After section specified here in this post.

Google Adsense

In your Adsense Async code, insert the following code snippet

(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=_iub.cs.api.isGoogleNonPersonalizedAds() ? 1 : 0;

between lines 8 and 9 of the Asynch > After section specified here in this post.

*The example above uses only the Asynchronous tag as the Synchronous tag does not support non-personalized ads. Read more about that here.

Other Implementation Methods

If you’ve instead set-up prior blocking of these scripts using Google features, you can follow Google’s instructions here (under Pausing ad requests).

You’ll need to make adjustments as follows:

  1. When using Google Publisher Tag setRequestNonPersonalizedAds(1) should be replaced with setRequestNonPersonalizedAds(_iub.cs.api.isGoogleNonPersonalizedAds() ? 1 : 0)
  2. When using AdSense or Ad Exchange asynchronous ad code requestNonPersonalizedAds=1 should be replaced with requestNonPersonalizedAds=_iub.cs.api.isGoogleNonPersonalizedAds() ? 1 : 0
Note

Consent to Google and its partners is collected via a single boolean toggle which works in parallel with the consent collected via the TCF as Google does not currently read TCF consents. For this reason, Google has advised the following in regards to the ATP list.

Do:

  • simply upload a static list.

Do not:

  • try to automate the process of outputting the IDs from the TCF data; or
  • try matching the TCF list with the ATP list.

The list can be download from Google Display Planner and then shared with SSPs – Sell Side Platform – (like FreeWheel) and alike.

If you use a static list with FreeWheel, when the Google toggle is off – meaning that consent has not been given and _iub.cs.api.isGoogleNonPersonalizedAds() is set to true – you’ll need to pass _fw_gdpr_consented_providers=216 in the ad request (216 is the Google id for FreeWheel).

This way you can override the hardcoded list in FreeWheel, and more assuredly indicate that consent was not collected. For implementation assistance, reach out to your FreeWheel account team.

See also

Still have questions?

Visit our support forum Email us