APIs & Integrations

SimonStocks
Member

Integrating Blog with Cookiebot - script does odd things

Hi all

 

Thanks for looking - really hoping one of you clever people can help as Support are drawing a blank.

 

We use Cookiebot on our website - https://www.cookiebot.com/en/ - to provide a GDPR compliant Cookies acceptance etc.  We want to use it on our Hubspot Blog and Knowledge Base also but are running into odd problems.

 

It seems simple enough - just insert a short script as the very first script within the HEAD-tag of your website to enable the cookies consent banner.

 

We've tried it with the blog and it works BUT for some reason it interferes with how the page loads - the recent posts don't load, the recommeded for you list doesn't load, the social links disappear and the subscriber form at the bottom doesn't load. As soon as you accept all the Cookies in the Cookies popup, these items immediately appear, so it seems to be blocking access until you accept. However even once you've accepted, if you then refresh the page, they disappear again.  This happens each time you refresh the page and there's no telling whether you'll get them all on the next page you browse to.

 

Can anyone shed any light on this? 

 

Could it be related to which cookies are marked as necessary on the site?

 

There also seems to be a difference between the cookies that Hubspot say should be there and what the Cookiebot tells me is actually there.

 

Looking at this page: https://knowledge.hubspot.com/articles/kcs_article/reports/what-cookies-does-hubspot-set-in-a-visito... I've compared the cookies that are listed in this article with what CookieBot says are on the site and many of them aren't on there, so I wonder if that's what's causing the problem.

 

e.g. a consent cookie __hstc The main cookie for tracking visitors. It contains the domain, utk, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session). This cookie is not present on the blog pages according to the CookieBot report.

 

I'm really at a loss to know what to do so would value some wise words.  

 

Even if you were able to recommend another Cookie system that's more compatible with Hubspot that would a step in the right direction!

 

Thank you in advance

Simon 

 

 

 

 

0 Upvotes
1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

Integrating Blog with Cookiebot - script does odd things

Hi @SimonStocks,

 

I hope all is well with you 😄

 

Happy to look into things together with you here!

 

Just to further clarify things here, where are you adding the cookiebot code script at?

 

On my end, I tried adding it in the head markup section of the blog template:

markup.png

 

And visit the blog post: 'what-is-loop' and I was able to see the recent posts and form that's on the footer. Also, checking into the page source of the page, I'm able to see that the cookiebot script is there. 

 

I'll go ahead and comment out the script added in the head markup template at line 70 first, you can uncomment it by removing <!-- (front) and --> (back) and see if it works for you.

 

Let me know how it goes!

0 Upvotes