Activate Adsense after consent
1 min
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:
<script type="text/javascript">
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1;
</script>This is to pause the delivery of ads. Subsequently, the following code must be inserted into the queue documented in the configurator:
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0;Then resume serving, in this case the ads will be able to retrieve the consent string generated by the CMP.