klaro-js icon indicating copy to clipboard operation
klaro-js copied to clipboard

Hubspot tracking code - cookie consent banner show up after accepting cookies

Open trompx opened this issue 2 years ago • 1 comments

Klaro Config

var klaroConfig = {
        apps: [
          {
            name: "google-analytics",
            default: true,
            title: "Google Analytics",
            purposes: ["analytics"],
            cookies: [/^ga/i]
          },
          {
            name: "hubspot",
            title: "Hubspot",
            purposes: ["marketing"],
            default: true,
          }
        ]

HTML Code of Page

    <script defer type="application/javascript" src="https://cdn.kiprotect.com/klaro/latest/klaro.js"></script>
    <script
      type="text/plain"
      data-type="text/javascript"
      id="hs-script-loader"
      data-name="hubspot"
      data-src="//js-na1.hs-scripts.com/XXXXX.js"
    ></script>

Steps to reproduce

When I accept the klaro cookie consent (when enabling hubspot), it automatically display the hubspot cookie banner.

Expected behavior

The hubspot cookie consent value should be set equal to the klaro value.

trompx avatar Oct 14 '22 15:10 trompx

Up, it indeed does behave weird for me too :) Whenever we decline hubspot, it loads the hubspots scripts anyway. Thus (is it because react is an SPA ?) we have to reload the page to make it relevant. Any idea ?

Morzanne avatar Jul 26 '23 15:07 Morzanne