Set up consent mode for AMP pages

  • AMP analytics tags have limited customization for consent mode parameters, relying on built-in AMP consent management.

  • You can specify which Google services (like ads, maps, or youtube) receive consented user data using the dma_cps list within your amp-analytics tag or Google Tag Manager configuration.

  • By default, ad personalization is denied for EEA users, but you can override this within your amp-analytics tag using allow_ad_personalization_signals .

The customization options for consent mode parameters in AMP analytics tags are limited. AMP offers built-in consent management, like delaying analytics tags until consent is given, as detailed in Displaying European regulations messages on AMP pages and amp-consent .

By default, ad_personalization consent is denied for users based in the European Economic Area (EEA). You can override ad personalization using your amp-analytics tag:

   
< script 
  
 async 
  
 custom 
 - 
 element 
 = 
 "amp-analytics" 
  
 src 
 = 
 "https://cdn.ampproject.org/v0/amp-analytics-0.1.js" 
>< / 
 script 
>  
< amp 
 - 
 analytics 
  
 type 
 = 
 "gtag" 
  
 data 
 - 
 credentials 
 = 
 "include" 
>  
< script 
  
 type 
 = 
 "application/json" 
>  
 { 
  
 "vars" 
  
 : 
  
 { 
  
 "gtag_id" 
 : 
  
 "<DESTINATION_ID>" 
 , 
  
 "config" 
  
 : 
  
 { 
  
 "<DESTINATION_ID>" 
 : 
  
 { 
  
 "groups" 
 : 
  
 "default" 
 , 
  
 "allow_ad_personalization_signals" 
 : 
  
 [ 
 true 
 | 
 false 
 ] 
  
 } 
  
 } 
  
 } 
  
 } 
  
< / 
 script 
>  
< / 
 amp 
 - 
 analytics 
> 
Create a Mobile Website
View Site in Mobile | Classic
Share by: