Make HubSpot script GDPR-compliant by requiring consent for analytics cookies

Is it possible to add the data-consent="analytics" attribute to the HubSpot analytics script to ensure that it only runs when the user has given explicit consent for analytics tracking, thereby making it GDPR-compliant?

what I want to achieve is this:

<script type=“text/javascript” id=“hs-script-loader” async defer src=“js-eu1.hs-scripts.com/139607942.js”></script>

soo it look like: <script type=“text/javascript” id=“hs-script-loader” data-consent=“analytics” async defer src=“js-eu1.hs-scripts.com/139607942.js”></script>

Hi, @JAlmeke :waving_hand: Thanks for your question. You’ll need to look at other options, as we cannot modify the script the way you want to.

Here are some resources and a link to an integration that can assist with this (if you are open to 3rd party tools):

Best,

Jaycee