Basic details
- Wordpress Website
- CookieBot implemented using WP plugin
- HubSpot forms added using Shortcodes & HS plugin
- GTM is installed but neither HS or CookieBot is implemented via GTM - only plugins
The issue
CookieBot is blocking our HS forms from loading, they are being tagged as ‘statistics’. We had previously fixed this by adding ‘data-cookieconcent=ignore’ to the form script however there has since been an update to either HS plugin, forms or WS and we are no longer able to do this.
We have Google Tag Manager installed but CB & HS are implemented via plugins, would implement them via GTM help this situation? Or just HS via GTM and using google consent mode
- Do we need the HS plugin on WP for the forms to work correctly?
- Would embedding the forms instead of using the shortcode help?
- If 1 is no, should we deploy HS tracking code via GTM & embedding codes?
Tried, tested and failed
- Changing the HS form cookie to necessary - this isnt GDPR compliant as the forms still track the user’s journey across the website
- Adding ‘data-cookieconcent=ignore’ for the HS tracking script - this isnt GDPR compliant as it would ignore all HS tracking
Hi @CMarritt,
Thanks for reaching out to the Community, and for providing this helpful information!
I wanted to share some similar threads regarding HubSpot + GTM and Cookiebot:
I also wanted to tag a couple of other users and internal contributors to see if they can share their experience with Cookiebot, GTM and HubSpot forms.
Hey @MatthewShepherd, @Aakar, @jenni_vere, @jobfounda, @marcbergeraf, @Thomas-HyHyve do you have any tips for @CMarritt?
I also wanted to point out that you have access to our Technical Support Team. I would recommend contacting them as they can provide real time assistance and get on a screen share. You can include this information from the original post so our technicians know which steps you’ve taken so far.
Best,
Kristen
Hi Kristen,
Thank you for your reply!
After reading through the suggested posts in seems they are referring to a HubSpot website and ours is a WordPress site using HubSpot forms as a lead capture perspective
Any further help is greatly appreciated
Hi there, we are encountering the same problem. Did you ever manage to relove this issue (I know it is over year now, so sorry if you have forgotten it or moved on).
Hi John, yeah we are using Wordpress and not HubSpot website builder, im not sure if this will help.
We got into contact with HubSpot Plugin developers and they suggested inputting some code into the plugin code. I believe they were implementing it into their next update. Let me know if youd like me to dig the emails out!
Hi yes that is how we are doing it as well, if you would be kind enough to dig out those emails that might be a terrific help. We have being scouring these boards but t o avail.
I found the email, I’ve added a link at the bottom to the video they sent me as well. Fingers crossed!
Go to Tools > Plugin File Editor
Select HubSpot All-In-One Marketing - Forms, Popups, Live Chat
At the right side select the file leadin/src/class-pagehooks.php
At the constructor add
add_filter( ‘script_loader_tag’, array( $this, ‘add_ignore_cookie_consent’ ), 10, 2 );
and then below the method
/**
* Add the data attribute to forms script
*
* @param String $tag tag name.
* @param String $handle handle.
*/
public function add_ignore_cookie_consent( $tag, $handle ) {
if ( ‘leadin-forms-v2’ !== $handle )
return $tag;
return str_replace( ’ src’, ’ data-cookieconsent=“ignore” src’, $tag );
}
Here’s a video on how to do so
Thank you for that I will forward it to our Dev team
Make sure to rescan with CookieBot after they’ve completed the changes! Ours is still working a year on so fingers crossed
I’ve followed the instructions here but still experiencing the issue with forms not appearing unless marketing cookies are accepted for Contact Livewell Vending - Coffee and Vending Solutions . I edited the class-pagehooks.php at this location: /wp-content/plugins/leadin/public as outlined here. Is there an update I need to be aware of?
Hi Friend, I just checked on your site and I can see your form before I accept and when I only accept necessary cookies