Block non essential Hubspot cookie on Hubspot CMS when using external cookie consent system
SOLVE
Hello, I use an external cookie consent system (Axeptio) on Hubspot pages. But I don't find how to block non essential Hubspot cookie (__hssc, hubspotutk). Hubspot alway trigger all cookie when it's on Hubspot pages 😕
I want theses cookies to be trigger only if visitor accept Hubspot cookies with Axeptio. If visitor accept then I want to trigger __hssc, hubspotutk cookies with Google Tag Manager.
Using anything but the Hubspot cookie tools is awkward as (to the best of my knowledge) unless you use the HubSpot cookie consent tools Hubspot will always place cookies when a visitor first comes to the web page. This means you can't be fully compliant. However, you can stop HubSpot collecting data on subsequent page visits.
This is done by adding code to your cookie consent tool to tell hubspot not to place cookies. This is done with the following javascript call to the hubspot API:
_hsq.push(['doNotTrack']);
This will add the donottrack cookie to the visitors browser so that no data will be tracked by hubspot, but the hubspot cookies have already been placed.
If the user uses your cookie consent tool to accept cookies you can then revoke the do not track cookie with this call to the API:
Using anything but the Hubspot cookie tools is awkward as (to the best of my knowledge) unless you use the HubSpot cookie consent tools Hubspot will always place cookies when a visitor first comes to the web page. This means you can't be fully compliant. However, you can stop HubSpot collecting data on subsequent page visits.
This is done by adding code to your cookie consent tool to tell hubspot not to place cookies. This is done with the following javascript call to the hubspot API:
_hsq.push(['doNotTrack']);
This will add the donottrack cookie to the visitors browser so that no data will be tracked by hubspot, but the hubspot cookies have already been placed.
If the user uses your cookie consent tool to accept cookies you can then revoke the do not track cookie with this call to the API: