Manual implementation of prior consent with AdWords Remarketing
Please note: This article was originally drafted to help implement Cookiebot prior to the release of the automated cookie control functionality on September 10th 2019.
You may still be using and preferring the manual implementation and markup option. In that case this article may still be relevant for you.
For automatic cookie blocking make sure that your cookie consent banner script includes the data attribute data-blockingmode=”auto” and that “async” is removed from the script example below.
Since the standard AdWords Remarketing Tag does not support asynchronous loading, you need to use the asynchronous version when implementing cookie consent on the tag.
If your existing tags look like this:
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 123456789;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script>
Then change it to this asynchronous version (remember to replace the value of google_conversion_id to your own id):
<script type="text/plain" data-cookieconsent="marketing">
CookieConsent.getScript("//www.googleadservices.com/pagead/conversion_async.js", true, function () {
window.google_trackConversion({
google_conversion_id: 123456789,
google_custom_params: window.google_tag_params,
google_remarketing_only: true
});
});
</script>