APIs & Integrations

toddpadwick
Participant

Hubspot Cookie banner with Google consent v2 and GTM. Consent is granted before banner

Hi,

I followed the instructions on this hubspot documentation to use Google Consent mode v2 with Hubspot's cookie banner. However, there is an additional consent update firing, enabling consent before the Hubspot cookie banner has been rendered or interacted with.  See image below from Tag Assistant:

Screenshot 2024-12-17 at 13.39.29.png

 

Here is the script I inserted in the head tag just before the GTM script is fired:

 

Screenshot 2024-12-17 at 13.43.25.png

I need to remove that unwanted consent update. Can anyone tell me why its being fired?

0 Upvotes
4 Replies 4
StephaneLM
Participant

Hubspot Cookie banner with Google consent v2 and GTM. Consent is granted before banner

An easier way would be to also look at cookie banner solutions that are much simpler to implement. They're called consent management platform (CMP). You can start with free CMP solutions first for instance. Just sharing this out there. Hope this helps, and good luck!

0 Upvotes
toddpadwick
Participant

Hubspot Cookie banner with Google consent v2 and GTM. Consent is granted before banner

I have found the problem. It is an error in Hubspot's documentation. They have used UK as the code in the region list for EU, however, that is not the official ISO code - it should be GB. 
I have updated this and confirm it works. 
Can someone get the documentation on this page amended? https://developers.hubspot.com/docs/reference/api/analytics-and-events/cookie-banner/google-consent-...

0 Upvotes
toddpadwick
Participant

Hubspot Cookie banner with Google consent v2 and GTM. Consent is granted before banner

Anyone able to help with this? I've checked with a chrome plugin and confirm the consent mode is incorrect. see screenshot of consent mode values before the hubspot cookie banner is interacted with:
Screenshot 2025-01-08 at 13.01.45.png

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Hubspot Cookie banner with Google consent v2 and GTM. Consent is granted before banner

Hi, @toddpadwick 👋 Thanks for your question and for including your details. This helps our community members have more context and know where/if they can assist you. 

 

Hey, @eburnaman @louischausse @CHawkins do you have any GTM wisdom you can share with @toddpadwick?

 

Thank you very much for taking a look! 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !