HubSpot CMS

  1. Open Settings → Website → Pages, pick the domain, and find Site header HTML.
  2. Paste the Shortbread tag and save:
<script src="https://tryshortbread.com/shortbread.js" data-site="YOUR_SITE_KEY" async></script>
  1. In Shortbread, click Verify my site.

Turn off HubSpot's banner

Open Settings → Privacy & Consent → Cookies and switch off the cookie policy for the domain, so HubSpot's banner stays hidden.

HubSpot's tracking code

HubSpot's own tracking loads with the page. Tell it to stand down until a visitor allows statistics, using the Shortbread JavaScript API:

<script>
  var _hsq = window._hsq = window._hsq || [];
  _hsq.push(['doNotTrack']);
  window.addEventListener('shortbread:consent', function (e) {
    if (e.detail.statistics) _hsq.push(['doNotTrack', { track: true }]);
  });
</script>

Cookie declaration

Add a Rich text or HTML module on your policy page containing <div id="ShortbreadDeclaration"></div>.