Hubspot Google Analytics integration guide
Connecting Google Analytics to your Hubspot content tools lets you measure traffic, behavior, and conversions across your website, blog, and landing pages in a single reporting stack.
This guide explains how to pull the tracking ID from Google Analytics and add it to your Hubspot settings so page views are recorded correctly.
Before you connect Google Analytics to Hubspot
Before updating anything inside Hubspot, confirm that your Google Analytics property is correctly configured.
- You must have Editor or Admin access in Google Analytics.
- You must have account permissions in Hubspot to edit website settings.
- Your site should not already load Google Analytics via conflicting scripts or plugins.
The steps are slightly different depending on whether you use the older Universal Analytics property (tracking ID begins with UA-) or the newer Google Analytics 4 property.
Find your Google Analytics tracking ID
You need the tracking ID or measurement ID from Google Analytics before you can enable tracking in Hubspot.
Step 1: Open your Google Analytics property
- Log in to your Google Analytics account.
- Select the account and property that tracks your website.
Make sure you pick the same property you intend to associate with your Hubspot hosted content.
Step 2: Copy the ID from Google Analytics
Use the appropriate method for your Analytics version:
Universal Analytics (UA-*)
- Go to Admin in the Google Analytics interface.
- In the Property column, choose Property Settings.
- Locate your Tracking ID (for example,
UA-123456-1). - Copy the full ID so you can paste it into Hubspot.
Google Analytics 4 (G-*)
- Open Admin from the left menu.
- Under the Property column, click Data Streams.
- Select the web data stream connected to your website.
- Copy the Measurement ID (for example,
G-ABCD1234).
Once you have the correct ID, you are ready to configure the Hubspot tracking options.
Enable Google Analytics in Hubspot settings
All Google Analytics configuration for Hubspot hosted content is handled in your account settings. The change applies globally to website pages, landing pages, and blog posts created in the content editor.
Step 1: Open your Hubspot settings
- Sign in to your Hubspot account.
- Click the settings icon in the main navigation.
- In the left sidebar, navigate to the Website or Content settings section, depending on your account layout.
This is where Hubspot centralizes options for domains, templates, and analytics tools.
Step 2: Navigate to the tracking configuration
- Inside settings, look for a subsection such as Pages, Blog, or Tracking & Analytics.
- Open the tab that controls Analytics or Tracking Code for Hubspot hosted pages.
The location and labels may vary slightly by subscription level, but the option to add a Google Analytics ID is available for Hubspot content tools.
Step 3: Paste your Google Analytics ID into Hubspot
- Locate the field labeled Google Analytics tracking ID or Measurement ID.
- Paste the ID you copied from Google Analytics (either
UA-orG-format). - Confirm that there are no extra spaces or characters.
- Click Save or Apply to store the setting.
Hubspot now injects the Google Analytics tracking script into supported content so page views and events flow to your Analytics property.
How Hubspot applies Google Analytics tracking
Once you save your tracking ID, Hubspot automatically attaches the Google Analytics script to selected content types.
Supported Hubspot content types
Google Analytics tracking is typically applied to:
- Hubspot website pages hosted on connected domains
- Hubspot landing pages created in the drag-and-drop editor
- Hubspot blog posts and listing pages
The script is inserted in the page header so Google Analytics can record traffic as visitors view your content.
Content that may require custom tracking
Some assets might not receive the default script and could need manual or custom tracking code:
- Standalone HTML files or non-Hubspot pages on your domain
- Externally hosted microsites or apps that only pass traffic to Hubspot
- Legacy templates with heavily customized header markup
For these scenarios, you can embed Google Analytics tracking manually or work with a developer to align non-Hubspot pages with your Hubspot tracking strategy.
Avoid duplicate Google Analytics scripts in Hubspot
Because Hubspot can inject Google Analytics directly, you should confirm that the tracking code is not added a second time via custom header HTML or other integrations.
Common sources of duplicate tracking
- Theme or template code that already contains the Analytics script.
- Third-party plugins that insert Google Analytics at the domain level.
- Custom header or footer HTML configured in Hubspot with an additional tracking snippet.
Duplicate scripts can inflate page views, sessions, and bounce rate, making your combined Hubspot and Analytics reporting unreliable.
How to check for duplicate Google Analytics on Hubspot pages
- Open a published page created in Hubspot.
- View the page source in your browser.
- Search for
UA-,G-, orgtagin the code. - Confirm that the Google Analytics script appears only once.
If you see multiple instances, remove the manual code from your Hubspot header or from external tools, and rely on the built-in tracking field where possible.
Validate that Google Analytics is receiving Hubspot data
After you add your tracking ID in Hubspot, verify that data is flowing into Google Analytics.
Use real-time reports in Google Analytics
- In Google Analytics, open Real-time reports.
- Visit a Hubspot page in a separate browser tab or an incognito window.
- Confirm that your visit appears in the real-time overview or view screen.
If traffic from Hubspot pages shows up, the integration is working and your tracking is active.
Monitor ongoing performance of Hubspot content
Over time, compare data from Google Analytics with reports inside your Hubspot analytics tools to understand:
- Which landing pages attract the most organic and paid traffic.
- How visitors move between blog posts and conversion pages.
- Which campaigns generate the most engaged sessions.
Aligning Analytics data with Hubspot contact and deal records gives you a complete view of marketing performance.
Learn more about the official Hubspot integration
For the latest details about supported features, limitations, and property types, review the official documentation on integrating Google Analytics with Hubspot content at this Hubspot knowledge base article.
If you need strategic help designing analytics-ready templates, dashboards, or SEO-friendly content around your Hubspot setup, you can also consult specialists at Consultevo.
Once configured correctly, the connection between Google Analytics and Hubspot turns your website into a powerful measurement hub, allowing you to refine campaigns, optimize pages, and report clearly on marketing ROI.
Need Help With Hubspot?
If you want expert help building, automating, or scaling your Hubspot , work with ConsultEvo, a team who has a decade of Hubspot experience.
“`
