CMS Development

lesliebartels
Colaborador(a)

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

Hi! We're currently using OneTrust to manage our cookies. The OneTrust tag and HubSpot tag are both managed through Google Tag Manager. GTM is configured for all domains hosted by HubSpot through Pages in Settings.

 

Example pages:

https://support.kemet.com/knowledge

https://go.kemet.com/05-2021-webinar-safety-capacitors-emi-preventing-harm 

 

The OneTrust tag is working for all of our domains EXCEPT for domains managed through HubSpot. These pages are still dropping the following unnecessary cookies onto a user's browser regardless of whether they have accepted cookies through the OneTrust banner:

_fbp

__hssc

hubspotutk

__hssrc

__hstc

 

Any thoughts on what I can do from the HubSpot settings menu or through the available Javascript files in our design manager to suppress these cookies until the user formally accepts? (I'm not a dev, so don't know how to use the API approach.)

 

Thanks in advance!

 

0 Avaliação positiva
1 Solução aceita
alyssamwilie
Solução
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

@lesliebartels Just realized it's Hubspot managed pages you're having trouble with. I don't believe there's a way to remove the tracking code from Hubspot pages as it's automatically added. But you could add a trigger in GTM as stated in my previous post to run the following code to revoke consent :

var _hsp = window._hsp = window._hsp || [];
document.getElementById("removeCookies").onclick = function() {
    _hsp.push(['revokeCookieConsent']);
};

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

Exibir solução no post original

9 Respostas 9
alyssamwilie
Solução
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

@lesliebartels Just realized it's Hubspot managed pages you're having trouble with. I don't believe there's a way to remove the tracking code from Hubspot pages as it's automatically added. But you could add a trigger in GTM as stated in my previous post to run the following code to revoke consent :

var _hsp = window._hsp = window._hsp || [];
document.getElementById("removeCookies").onclick = function() {
    _hsp.push(['revokeCookieConsent']);
};

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
alyssamwilie
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

Hey @lesliebartels 

 

Hubspot still tracks things like page views before even identifying the user so if you aren't using the Hubspot cookie policy banner those cookies will be added by the tracking code on page load (stated by an employee in this post).

GTM has variables for reading cookies that you could use to read whatever cookie OneTrust sets for determing consent and then using that variable to trigger the Hubspot tracking code if consent is given. You'd possibly need a developer to set this up but here's a blog post on how tot use cookies in GTM - https://www.analyticsmania.com/post/cookies-with-google-tag-manager/

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
lesliebartels
Colaborador(a)

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

@Kevin-C @dennisedson - can I assume that I need to get developer support (someone who can work with the API) to prevent this issue? Please confirm.

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

@lesliebartels , I believe you would be better off getting a developer to help you navigate this one. 

@Anton might be able to help 😉

0 Avaliação positiva
lesliebartels
Colaborador(a)

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

@dennisedson or @Kevin-C any thoughts? Is this something that I can fix without a dev helping by building something through the API? Thanks!

0 Avaliação positiva
lesliebartels
Colaborador(a)

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

No progress yet, @dennisedson. Thanks for checking in.

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

Hey @lesliebartels 

Did you make it anywhere with this?  @Kevin-C@Josh , any thoughts?

0 Avaliação positiva
Kevin-C
Especialista reconhecido(a) | Parceiro
Especialista reconhecido(a) | Parceiro

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

Hmm I'm not really sure how to approach this.

I'm curious, does HS drop in the cookies set to false or empty prior to the user accepting or rejecting them?

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Avaliação positiva
lesliebartels
Colaborador(a)

Cookies Dropping on HS-Hosted Pages Without Permission

resolver

Hey @Kevin-C - How can I tell? Here's what I see when I inspect through the dev tool. This is prior to me accepting cookies: https://www.screencast.com/t/SPtUq6Gs

0 Avaliação positiva