HubSpot Cookie Consent – Control the use of non-HubSpot cookies on your website

On June 4, 2018, in Coding, HubL, HubSpot, Javascript, by Dipin Krishna

The HubSpot Cookie Consent banner sets a cookie name ‘__hs_opt_out’ when you accept/decline the cookie consent. You can make use of the status of the consent to remove/allow other cookies on your website, eg: google analytics. We can get the status of the consent by adding a callback function to the ‘addPrivacyConsentListener’ event. //Add a […]

Tagged with:  

HubSpot – Show the Privacy Cookie Consent Banner above the Body instead of an Overlay

On May 24, 2018, in Coding, HubL, HubSpot, by Dipin Krishna

When you enable the Cookie Policy in HubSpot you only have two options, either to show it as a top banner or as a bottom banner. The top banner is going to be a fixed banner, making it an overlay on the content at the top. Use the following jQuery code to push the body […]

Tagged with: