On November 1, 2019, we made a change to the Google Analytics integration that will prevent the Google Analytics tracking script from firing until a visitor opts in to cookie tracking via the HubSpot cookie banner.
So customers hosting their website with HubSpot can ensure their Google Analytics tracking is compliant with GDPR and EU cookie laws. If visitors don’t opt in to cookie tracking, the Google Analytics script won’t fire. This may result in a decrease in the traffic recorded on HubSpot-hosted pages in your Google Analytics account.
If you’re using the Google Analytics with HubSpot integration, you don’t need to take further action.Your HubSpot cookie banner will control your native Google Analytics integration on your HubSpot-hosted pages.
If you’re not using the Google Analytics with HubSpot integration but want the cookie controlled by the banner, you will need to set up the integration.
If you don’t want your HubSpot cookie banner to control your Google Analytics script on your HubSpot-hosted pages, you can add your Google Analytics tracking code to your site header HTML instead. When you add your Google Analytics tracking code snippet to the header HTML instead of integrating Google Analytics with HubSpot, the Google Analytics script cannot be controlled by the HubSpot cookie policy banner. By default, it will record data on visitors regardless of whether a visitor opts in or out unless you customize your Google Analytics script.
This Google document on disabling the Google Analytics tag may be a helpful resource. Next steps are as follows:
If you have any questions about this change, or how it might have impacted your reporting in Google Analytics, please reach out to your HubSpot Customer Success Manager or the HubSpot Support team. We’re here to help however we can. If you have general non-account specific development questions or comments please join the conversation in the developer forums.