Hey @sakashin ,
not really, I’m afraid. Like I mentioned earlier, this only counts for pages that are hosted on HubSpot. So, you would need to have a Marketing Professional or CMS Plan for that.
When you would like to use the HubSpot Cookie Banner on your other webpages where you installed the HubSpot Tracking Snippet, you can do the following with the Google Tag Manager:
In the site <head>:
<script>
var _hsq = window._hsq = window._hsq || [];
_hsq.push(['addPrivacyConsentListener', function (consent) {
if (consent.allowed) {
// All of your codes go in here. You can place this wherever you want on your site, but the header is a common placement.
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','THIS IS WHERE THE GTM ID GOES');
}
}]);
</script>
Above </body> closing (doesn’t change from the original)
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="[https://www.googletagmanager.com/ns.html?id=GTM-M3CZVPJ](https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXXX)"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Credit @IsaacTakushi
This way, the GTM only gets executed when the consent of the HubSpot Cookie Banner is given. I recommend checking this with the GTM Debugger.
Don’t forget to change the GTM ID.
See this thread for more info:
https://community.hubspot.com/t5/APIs-Integrations/cookie-tracking-in-banner-with-GA/td-p/271193
Hope this helps,
Chriso