Advanced Tutorials

Activate Adsense after consent

1min

If it is necessary to activate Google Adsense only following consent it is necessary to insert it in the tag <head>, before any other Adsense script on the page, the following code:

HTML


This is to pause the delivery of ads. Subsequently, the following code must be inserted into the queue documented in the configurator:

JS


Then resume serving, in this case the ads will be able to retrieve the consent string generated by the CMP.