klaro-org / klaro-js

Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.

Home Page:https://klaro.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

trompx opened this issue · 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.

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 ?