How To Integrate Google Analytics With HubSpot?

Many marketers use both HubSpot and Google Analytics (GA) for web analytics but aren’t sure which is the best. You don’t even have to because you can integrate HubSpot with Google analytics hub. Your Google Analytics account will collect data on visits to your HubSpot site when you combine Google Analytics with HubSpot.

There are 2 ways through which you can integrate HubSpot and Google analytics:

  1. Using a Google Analytics tracking ID. Only a Tracking ID can be used by users with a Marketing Hub Starter subscription and no CMS Hub subscription.
  2. Add your Google Analytics tracking code snippet to your domain’s site header HTML.

Method 1- HubSpot Google Analytics Integration Via Tracking Code

  • From your HubSpot account, navigate to settings icon.
  • Navigate to website >pages
  • Select a domain from the Choose a domain to edit its settings dropdown menu to update its settings. Select Default settings for all domains to apply tracking to all HubSpot-hosted content. If a disagreement arises, the domain-specific settings will precede the default settings.
  • Select the Integrations tab from the dropdown menu.
  • Select the Integrate with Google Analytics checkbox in the Tracking integrations section. Clear this checkbox to disconnect the integration instead.
  • Enter a Google Analytics Tracking ID in the field. Alternatively, you can add the Google Analytics monitoring code to your site’s header HTML.

default-for-all-domains-png-856×434-

  • Click Save on the bottom left.

Method 2- HubSpot Google Analytics Integration by Applying Google Analytics to the site header HTML of a domain.

In settings, you can add the Google Analytics tracking code to your domains’ header HTML. If you’re utilizing a custom Google Analytics script, this is also a good idea. 

Please Note:

The HubSpot cookie policy banner does not influence tracking code added via header HTML. It will automatically record data on visitors regardless of whether or not they have opted in. Google’s developer documentation can further help you adjust this behavior. Your legal and development teams are the greatest resources for ensuring that your site’s use of the Google Analytics script complies with privacy rules.

  • Go to settings option from the main navigation bar > Go to website > pages
  • Select Choose a domain to edit it’s settings > Choose domain 
  • Select Default settings for all domains, to add the tracking code to all HubSpot-hosted domains. If a conflict arises, the domain-specific settings will precede the default settings.
  • Enter your Google Analytics tracking code in the Site header HTML area. Learn how to locate your Google Analytics tracking code on Google’s Website.

add-google-analytics-to-a-domain-png-1362×882-

  • Click save from bottom left.

Was this Helpful ?

CONTACT

Ready to transform how you market your business

Let's get connected for a free consultation