The IAB Transparency & Consent Framework (TCF) is an open-standard technical framework that enables websites, advertisers and ad agencies to obtain, record, and update consumer consent for web pages. Google Analytics integrates with TCF version 2 to control advertising features for customers using gtag.js or Google Tag Manager.
Customers can enable TCF support by setting the following window property to
window property must be set before any calls to
gtag() are made, and this property must be set on each page for which you want to enable TCF support. If the property is not set or set to
false, TCF support will not be activated.
A "Purpose" in the TCF context is a defined intent for processing data. Google Analytics tags implemented via Google Tag Manager or gtag.js with TCF support enabled will handle requests that contain the consent string in the following ways:
|Purpose||Description||Impact to Google Analytics when Purpose is denied|
|1||Store and/or access information on a device||Advertising-related cookies will not be created or used by Google Analytics. Google signals features such as remarketing, demographics, and interests reports will not accumulate data for unconsented users.|
|3||Create a personalised ads profile||Hits to Google Analytics will be marked with an npa=1 parameter.
Events marked with npa=1 are not eligible for ads personalization, and are not used for remarketing audience evaluation. Users already added to audience lists are unaffected.
|4||Select personalized ads||
Hits to Google Analytics will be marked with an npa=1 parameter.
Same as purpose 3.
|7||Measure ad performance||allow_google_signals will be set to false.
Advertising-related cookies will not be used by Google Analytics. Google signals features such as remarketing, demographics, and interests reports will not accumulate data for unconsented users.
|9||Apply market research to generate audience insights||allow_google_signals will be set to false.
Same as Purpose 7.
|10||Develop and improve products||allow_google_signals will be set to false.
Same as Purpose 7.
Note: Google Tag Manager and the global site tag only accept TCF strings that are correctly implemented according to the TCF policies and technical specifications, and adhere to Google’s EU User Consent Policy. If your CMP doesn’t respond within 500 milliseconds or you see “error”, “stub”, or “loading” status, the tag will proceed in a restricted mode:
- Writing and reading of Ads first party and third party conversion cookies will be restricted
- Google Analytics advertising features are integrated with IAB TCF v2 and will treat those requests as if they came in with all Purposes denied, the effects of which are outlined in the table above.
- Remarketing features will be disabled.
Troubleshooting error messages
If your CMP doesn’t respond within 500 milliseconds or you see “error”, “stub”, or “loading” status, the tag will proceed in a restricted mode. To fix that:
If you are manually invoking the function to fire a conversion tag:
- Make sure the response to
getTCData TCData.eventStatus = 'tcloaded'OR
'cmpuishown' + 'useractioncomplete'is sent within 500 milliseconds. These indicate the CMP is ready to provide the user with a choice regarding consent.
If you are not manually invoking the function to submit a conversion tag:
- Work with your CMP to ensure they implement support for
getTCData and return TCData.eventStatus = 'tcloaded'OR
'cmpuishown' + 'useractioncomplete'to indicate the user consent is ready for use through the API within 500 milliseconds.