My question:
Is there any way to modify or override the Hubspot standard modules (“{{ standard_header_includes }}” / “{{ standard_footer_includes}}”) that are referenced from the base.html pages in the theme and load some HubSpot specific code modules?
Longer story with reasoning:
My company is based inside the EU and we use Cookiebot as our Cookie Consent Management solution which also supports “prior consent” - which means as long as the end user does not make a choice, no third party scripts are ever loaded and cookies set.
E.g. we load all our ad pixels via Google Tag Manager which in turn is enabled through explicit user consent for “Marketing Cookies”.
This technically works by modifying the Javascript embed tag from
<script language=“text/javascript”>
to
<script language=“text/plain” data-cookieconsent=“marketing”>
Cookiebot then works to load the tagged scripts according to the user preferences.
I have embedded Cookiebot into my base.html template in the <head> section and it loads fine.
I have also added Google Analytics and Google Tag Manager into the base.html and configured them to be loaded when the user has given appropriate consent for “Statistics” or “Marketing”. That works fine too.
However, when I set up Ad Pixels in the Ads section of the Marketing Professional product, HubSpot insists on loading the ad pixels through the HubSpot JS Code autmatically which breaks the user consent.
Also the HubSpot tracking code always runs and cannot be attributed to a Cookie Consent value for Cookiebot.
Plus the standard Hubspot templates always include Twitter, Facebook and LinkedIn SDKs which is also not desirable from a privacy perspective if they are not needed.
My question:
Is there any way to modify/override the standard templates that wrap the theme and load the HubSpot specific code modules?
E.g. in the header I want to remove
<script src=“//platform.linkedin.com/in.js” type=“text/javascript”>
lang: en_US
</script>
