Opt-Out link for Cookie-Tracking consent

Currently there is a Privacy Policy Banner option that allows first-time webpage visitors to consent to webpage Cookie Tracking (See the Knowledge Base article "USER GUIDE
How to enable a privacy policy alert if you are doing business in Europe").


It would be great to have a feature, like an opt-out link, where webpage visitors can opt-out of Cookie Tracking at any time.

HubSpot updates
6 Replies
New Contributor

Yes, this would be great! Our client requires ist for GDPR compliance.

HubSpot Employee
HubSpot Employee

Just a quick note for people coming across this feature request: this functionality does now exists, but it is necessary to use the Tracking Code API. Documented here: https://developers.hubspot.com/docs/methods/tracking_code_api/remove_cookies

New Contributor

Thanks @vbrech, but how to make this work on our Wordpress website? We need a button / link to this API. We are dummies, so some simple explanation would be welcome. 


New Contributor

I agree with mhappel - we need a simple link to integrate into a normal text to be able to use this.

Top Contributor

Yes - it would be great to add this feature to our cookies page. Users need to be able to change their mind and opt in our out as they see fit.


I also added a seperate idea here for a report to see how many of my visitors are clicking accept / decline in order that I can work to improve the number of accepts via improved copy writing and button text.

HubSpot Employee
HubSpot Employee

Hi guys, one solution here would be to create a dedicated landing page that is designed to remove the existing cookie consent. You could then link to that page when you want to give the option of removing HubSpot cookie consent.


In that landing page, you could add this code in the footer html of the page (i.e. go to "Settings" in the page editor, then "Advanced options", then copy+paste the following code in the "footer html" section:


var _hsq = window._hsq = window._hsq || [];


What this code does is initialize the array ("_hsq") which the HubSpot tracking code uses to process events (explained here), and then adds the request to remove cookie consent to it (this one here).


So you could edit that landing page to read something like "Removal of your cookie consent status has been requested. Reload the page to see the initial cookie banner again."