Problem with external GTM cookie bar

Highlighted
Regular Contributor

  Hello!

  I've a client who have implemented a cookie bar via Google Tag Manager. Cookies are only loaded wether you accept to, if you don't, the bar blocks every cookie.

  It works perfectly in a normal website, but not in Hubspot landings because they have their pixel fixed.

  Are there any way to delete this pixel and use the Hubspot pixel that the bar introduce?

  Thanks in advance!

Reply
0 Upvotes
3 Replies 3
HubSpot Moderator

Hi @Hubsforero 

 

Just for a little clarification around my response:

 

Are there any way to delete this pixel and use the Hubspot pixel that the bar introduce?

I will assume by the above question, you mean you'd like to remove the HubSpot Cookies placed on a HS hosted page. If this is incorrect, please do correct me. 

 

To confirm, the HubSpot Cookies are only placed in the browser upon a user accepting cookies on the page itself, of course this is when they accept cookies via the HubSpot cookie banner.

 

This is currently the only method for placing HubSpot cookies. We do provide some API endpoints for interacting with our Tracking Code which handles certain aspects of cookie placement and a few other features.

 

As an example, we can do a few different things such as identify visitors and track page views, but we require the use of our tracking code which handles the placement of the cookie. To add further context to this, if we look at tracking identities of contacts; the HubSpot analytics tool identifies unique records using two pieces of data, the usertoken (stored in the visitors browser in the hubspotutk cookie) and the email address. This means that in order for this to work, the cookie must be placed after the contact has accepted cookies on the site. If this is removed, we'd lose core functionality. 

 

This means that in order to work with external cookies and HubSpot cookies, you'd have to work with the HubSpot Cookie Banner and use our Get privacy consent status endpoint to in-turn interact with the external cookie settings. 

 

To detail how this would work, we can call the following function found here, to detect when a visitor accepts or declines their HS banner and then from there, we can use that to control any additional cookies on your website that would originally be handled via GTM.

 

I hope this helps!

 

Matthew Willson

HubSpot Developer Support
Reply
0 Upvotes
Regular Contributor

   Hi Matthew!

   Thanks for your help! But the client want to use his own bar because they are paying for this service to another company. The solution you add it's a good solution and we use that in other clients (addPrivacyConsentListener function), but not this time.

   Now, we are trying to manage Hubspot bar with de GTM bar, because Hubspot blocks every cookie in loading.

   Thanks again!

Reply
0 Upvotes
HubSpot Moderator

Hi @Hubsforero 

 

Thanks for the clarification! Do let me know if your client has any questions regarding the configuration that we've spoken about above or if there are any other details you'd like clarified.

 

Matthew Willson

HubSpot Developer Support
Reply
0 Upvotes