GDPR

akubrin
Teilnehmer/-in

HubSpot cookies on externally hosted sites

Hello HS experts,

I have an externally hosted website, and I'm trying to set up a cookie banner that controls cookie behavior in a way that is transparent and sensible to site visitors. I want the banner to have Accept, Reject, and Settings buttons.

Is there a way to control cookies so that a user's choice applies to my own cookies (such as Google Analytics) and to HubSpot cookies?

I'm using the GDPR Cookie Consent plugin on WordPress. It allows me to add JavaScript to the <head> and <body> sections. On HS, I'm a Marketing Starter user.

Thanks in advance for any advice you can share. I'll be curious to know how others have handled this issue.

Best,

AK

0 Upvotes
4 Antworten
PamCotton
Community-Manager/-in
Community-Manager/-in

HubSpot cookies on externally hosted sites

Hello @akubrin 

 

This article discusses how the HubSpot cookies and banner work. For information on using the banner for third-party scripts, I wanted to share this resource.

 

Wanted to invite in this conversation some thought leaders to see if they can share their experience with you.

Hi@mike-ward @Nynke_HM  @timfresen, could you please share your thoughts with @akubrin?

 

Thank you,

Pam

 

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


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




akubrin
Teilnehmer/-in

HubSpot cookies on externally hosted sites

Hi Pam,

Thank you for this information. It was very helpful. The banner I created for the default policy is now appearing on my site.

It has blocked or covered up my non-Hubspot cookie banner, so users now cannot access that banner and control their non-Hubspot cookies. However, there are a few issues.

The color settings I selected under Notification Style and Preview are not taking effect. How do I make these settings actually work?

Also, what do I do with the code under Cookie Settings Button? Do I add it as a header or footer script?

The best solution would be to have one cookie banner that controls both HubSpot and non-HubSpot cookies. Is that possible?

Thanks.

AK

0 Upvotes
PamCotton
Community-Manager/-in
Community-Manager/-in

HubSpot cookies on externally hosted sites

Hello @akubrin, you will need to edit your code on your external page 

 

div#hs-eu-policy-wording {
color: #fff;
}

 

About the code, could you please provide more details about this question?  The more information, screenshots, and details you can provide, the better I can advise on the next steps.

 

Thank you,

Pam

 

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


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




akubrin
Teilnehmer/-in

HubSpot cookies on externally hosted sites

Hi @PamCotton,

I was referring to the following code for a cookie settings button:

 

<!-- Start of HubSpot code snippet -->
<button type="button" id="hs_show_banner_button"
style="background-color: #373737; border: 1px solid #373737;
border-radius: 3px; padding: 10px 16px; text-decoration: none; color: #fff;
font-family: inherit; font-size: inherit; font-weight: normal; line-height: inherit;
text-align: left; text-shadow: none;"
onClick="(function(){
var _hsp = window._hsp = window._hsp || [];
_hsp.push(['showBanner']);
})()"
>
Cookie Settings
</button>

<!-- End of HubSpot code snippet -->

 

The text above the code tells me to add it to "any page that has the Hubspot banner code on your site."

 

My WordPress theme allows me to add code to the header or footer--that is, just before the </head> tag or just before the </body> tag. Where should I place the code above?

 

Also, where would I place the code you supply:

 

div#hs-eu-policy-wording {
color: #fff;
}

 

Thank you for all your help.

Andy