Add a consent revocation link to your app or site
Consent revocation is the process by which users in the EEA (European Economic Area), the UK, and Switzerland who consented to personalized ads can revoke that consent. You must provide a link in your site or app's menu that allows users who want to revoke consent to do so, then present the consent message to those users again.
Note:
- Consent revocability is a requirement of the Privacy & messaging user consent program. Ensure you include a consent revocation link at the bottom of your site or in your site menu titled "Privacy and cookie settings" before publishing consent messages. You may also include a consent revocation link on your data, cookie, or privacy policy page.
- AdSense publishers who create European regulations messages using the Auto Ads functionality do not need to follow this process to implement a consent revocation. The consent revocation link is shown automatically on their sites.
Consent revocation function for apps
Visit the developer documentation to learn more:
Consent revocation function for sites
Use Privacy & Messaging JavaScript API to display a revocation link on a site. Use the following function to call the revocation flow: googlefc.callbackQueue.push(googlefc.showRevocationMessage)
Code sample
Consent revocation function for AMP (Beta)
Complete the following steps to call the revocation flow:
- Place the following consent revocation code before the "
clientConfig" attribute within the<amp-consent>tag in your site's HTML code:"postPromptUI": "fcConsentRevocation"Code sample
<amp-consent id="googlefc" layout="nodisplay" type="googlefc">
<script type="application/json">
{
"postPromptUI": "fcConsentRevocation",
"clientConfig": {
"publisherIdentifier": "[unique publisher ID]"
}
}
</script>
</amp-consent> - Place the consent revocation link code after the closing
</amp-consent>tag in your site's HTML code to call the revocation flow:Code sample
<div id="fcConsentRevocation">
<button on="tap:googlefc.prompt(consent=googlefc, expireCache=true)">ManagePrivacy Options</button>
</div>
The code within the fcConsentRevocation <div> tag is fully customizable. After you've implemented the code, you can adjust it as needed, but any changes to the code must adhere to the following guidelines:
- You must include the button with the special syntax.
- The
<div>ID must match thepostPromptUIvalue in the<amp-consent>HTML code.Example
<div id="fcConsentRevocation">should match"postPromptUI": "fcConsentRevocation" - The
<amp-consent>ID must match thetapvalue in the button HTML code.Example
<amp-consent id="googlefc" [...] >should match<button on="tap:googlefc.prompt [...]" >