Cookie Banner integration with GTM (Google Tag Manager)

Modified on Mon, 29 Jan 2024 at 02:42 PM

Integrate illow cookie banner in less than 2 minutes.

Check here how to add illow's banner through Google Tag Manager and ensure it runs before any other third-party script.

Plus, by doing it this way illow will initialize the Google Consent Mode V2 properly for you without the need for any extra configuration.



Okay, let's see how to do this!





Step by step

Important: If you have already integrated the banner some other way (by adding the code directly to your HTML or by adding it to GTM with the Custom HTML tag), remove it before starting these steps.


1. In Google Tag Manager, go to the Templates section and click on "Search Gallery".



2. Click on the magnifier icon at the upper right part of the screen and look for "illow". Select "illow Cookie CMP".



3. Click on "Add to workspace" and then confirm the installation when the pop-up opens.



What has just happened?

If you followed these three steps, you just installed our Tag Template which will do all the magic. It's as if you had installed a plugin on Wordpress. Now all we need to do is actually use it. Let's go!


Activating the illow banner

  1. In Google Tag Manager, now go to the Tag section and click on "New".



2. Then click on the Tag configuration box and pick illow Cookie CMP tag type.



3. Paste the Site ID you see at illow's integration screen in the tag input.



4. Then click on the Triggering box and set Consent Initialization - All Pages as the trigger for the tag.



5. Add a name to the tag on the upper left and then click on "Save".



6. Finally, publish the new version by clicking on Submit.





Congratulations! Your cookie banner is now active on your website! 

Plus, no need to do anything else to activate Google Consent Mode V2



Next steps


Troubleshooting

I installed the tag template and enabled support for IAB TCF v2.2 and Google Additional Consent, but Google ads are still being displayed.

In order to block Google Ads until the user gives the explicit consent, a function called "__tcfapi" must be defined in the browser before the ads get loaded. The illow banner does that for you as soon as the tag is fired in GTM. So if you are still seeing the ads on your website, it means that they are being loaded before the tag is being fired!

Please check that all the triggers in GTM are correctly configured.

If the issue is still happening, you can place the following code snippet at the top of the <head> tag in your HTML.

<!-- IAB Stub -->
<script>(function(w,d,t,l,n){w[l]=w[l]||[];w[t]=w[t]||function o(...a){return(a.length>0&&w[l].push(a))||w[l]};function f(){var a=w.frames[n];if(!a){if(d.body){var i=d.createElement('iframe');i.style.cssText='display:none';i.name=n;d.body.appendChild(i)}else{setTimeout(f,5)}}};f();})(window,document,'__tcfapi','__tcfapiQueue','__tcfapiLocator')</script>
<!-- End IAB Stub -->


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article