Skip to main content
Meticulosity Global

HubSpot

How to Add Google Analytics to HubSpot: A Step-by-Step Guide


Connect Google Analytics 4 to HubSpot the current way: the Measurement ID path, the consent question to settle first, and where the data actually lands.

By Dr. Ahmed MouradyUpdated August 14, 20264 min read
A polished, whiteboard-covered wall behind the long table displays a stylized graph of data points converging into a single, ascending line.

Key Takeaways

  • Connecting GA4 to HubSpot is a Measurement ID pasted into one settings screen, not a script you write, and the Measurement ID method works even on a Marketing Hub Starter subscription with no Content Hub attached.
  • This integration mirrors page views and traffic sources into GA4. It does not track form submissions or other on-page actions as GA4 events; that is a separate, deliberate build.
  • Signups from the Middle East and Africa have defaulted to HubSpot's EU data region since 19 July 2021, and that region is not one you can move out of later, so know where the data sits before you connect anything.
  • Data privacy settings are on by default for EU-hosted portals, which is how most regional accounts are provisioned, so a visitor who does not accept cookies will show up in GA4 and HubSpot alike as unattributed traffic rather than not showing up at all.
  • Verifying the connection is a waiting game, not a debugging exercise: give it a few hours before assuming the Measurement ID was entered wrong.

Connecting Google Analytics 4 to HubSpot is one settings screen and one ID. What takes longer is deciding what the connection is actually for, because it hands you page-view and traffic-source data, not the form submissions and clicks most teams assume come with it, and it inherits whatever your portal already has decided about consent.

This guide covers the connection itself: getting the Measurement ID, where HubSpot wants it, and what to check before you assume the data flowing in is complete. If you're trying to see a specific form submission show up as an event in GA4, that's a separate build, covered in how to track HubSpot form submissions in GA4.

What This Integration Actually Does

HubSpot's own analytics doesn't go away when you connect GA4; the two run in parallel. The Measurement ID integration tells HubSpot to mirror page views and traffic-source data from your HubSpot-hosted pages into your GA4 property, so the two tools are looking at the same underlying visits. It does not, on its own, turn a form submission, a CTA click, or any other on-page action into a GA4 event. GA4 sees the page load; it does not automatically see what a visitor did once they were on it.

That distinction matters because it's the one most guides skip past, and it's the reason a marketer who connects GA4 expecting form-conversion data in their GA4 reports the next morning is disappointed for no fault of the setup.

Settle This Before You Connect Anything

Two questions are worth answering before the Measurement ID goes anywhere, because both are usually already decided for a portal bought in this region rather than left for you to choose.

Where is the data actually hosted? HubSpot assigns a portal's data-hosting region by IP geolocation at signup, and there is no in-region hosting for the UAE or Saudi Arabia. The five regions are US East, US West, Canada, Australia, and the EU in Germany. Signups from the Middle East and Africa have defaulted to the EU region since 19 July 2021, and that assignment holds: HubSpot offers a move to another regional data center only out of the US East data center, and only where the account's data is already hosted in the United States. A portal bought here keeps the region it was given at signup. Worth knowing before a client or a compliance reviewer asks, not after.

Who has actually agreed to be tracked? Data privacy settings in HubSpot are a portal-level switch, available on every product and plan, and for EU-hosted accounts, which is how most regional signups are provisioned, that switch is on by default. In practice: a visitor who never clicks Accept on the cookie banner, whether they declined it or just ignored it, gets recorded as direct traffic in HubSpot rather than attributed to the channel that actually brought them, and if they convert on a form before accepting, their record shows no page-view history at all. If nobody has scoped the banner to specific countries, it displays to every visitor, GCC included, not only the audiences it's usually built for. Once GA4 is connected, expect the same gap to show up there too: it isn't a tracking bug, it's the honest result of a visit HubSpot was never allowed to fully record.

How to Connect Google Analytics 4 to HubSpot

Step 1: Get Your GA4 Measurement ID

  1. Log into Google Analytics and open the account and property (your website) you want connected.
  2. Click Admin in the bottom-left corner.
  3. Under Property settings, open Data collection, then Data streams, and select your web stream.
  4. On the Web stream details screen, copy the Measurement ID. It starts with G-.

Step 2: Add It to HubSpot

  1. Log into your HubSpot account.
  2. Click the Settings gear icon in the top navigation.
  3. Go to Content > Pages, and select the domain you want to track from the dropdown.
  4. Open the Integrations tab.
  5. Check Integrate with Google Analytics 4, and paste the Measurement ID you copied.
  6. Click Save.

Do this per domain if your portal runs more than one. This Measurement ID method is the one available broadly, including on a Marketing Hub Starter subscription with no Content Hub attached, so subscription tier isn't a blocker here.

Step 3: Verify It's Working

Give it a few hours; HubSpot traffic doesn't appear in GA4 instantly. Check GA4's realtime report while browsing your own HubSpot-hosted pages first, since that confirms the wiring faster than waiting for organic traffic. Once regular data starts arriving, double-check that the Measurement ID in GA4 matches the one entered in HubSpot exactly. A single mismatched digit is the most common reason a connection looks live in HubSpot but never shows a HubSpot-sourced session in GA4.

What's Next

Connecting the platforms gets you a shared view of traffic. It does not get you a form submission as a trackable GA4 event, an audience you can build off that submission, or a way to join a HubSpot contact record back to the GA4 session that created it. Those all need their own setup on top of this one, which is exactly what tracking HubSpot form submissions in GA4 walks through next.

If GA4 and consent settings are being wired up as part of a broader site build rather than bolted onto an existing one, that's website design and development work, and it's worth sequencing analytics into the build plan rather than adding it after launch. Meticulosity Global is a HubSpot Diamond Solutions Partner, a status held by fewer than 3% of partners worldwide, with 12+ years of HubSpot delivery behind the regional bench. Reach out if you'd like a second pair of eyes on the setup.

Sources

  1. HubSpot: Migrate Your Account Data to Another Regional Data Center FAQ (opens in new tab)
  2. HubSpot: Data Centers (opens in new tab)
  3. HubSpot: How Does HubSpot Track Visitors (opens in new tab)

Frequently Asked Questions

Does connecting Google Analytics to HubSpot track form submissions automatically?

No. The standard integration mirrors page views, sessions and traffic-source data into GA4. A form submission is a separate signal that HubSpot does not push into GA4 on its own, because HubSpot forms render inside an iframe and a normal GA4 click trigger on the parent page cannot see into it. Tracking the submission itself as a GA4 event needs its own setup, covered in our guide to tracking HubSpot form submissions in GA4.

Where does HubSpot's Measurement ID field live?

In Settings, under Content > Pages, select the domain you want to track from the dropdown, open the Integrations tab, and check Integrate with Google Analytics 4. That is where the Measurement ID (the identifier starting with G- from your GA4 property's data stream) gets pasted in. It applies per domain, so a portal running more than one domain needs the ID added to each.

Do I need a paid HubSpot subscription to connect GA4?

No. The Measurement ID method is the one available across subscription tiers, including a Marketing Hub Starter account with no Content Hub attached. A separate, more involved route exists for pasting a raw GA tracking snippet into site header HTML, but the Measurement ID field is the one built for this and the one most accounts should use.

Why does my HubSpot data show more direct traffic than Google Analytics?

Partly a consent effect. Where a cookie banner gates tracking, a visitor who declines it, or simply ignores the banner without clicking Accept, is recorded as direct traffic rather than attributed to whatever channel actually brought them. On an EU-hosted portal, which is the default for signups from this region, that banner setting is on unless someone has scoped or disabled it, so check what countries it is set to cover before assuming your channel data is complete.

Website Design and Development

Is Your Website Built on the Same System as Your CRM?

A site running outside HubSpot means forms, tracking and personalization never fully connect to your pipeline. We design and build on the HubSpot CMS: landing pages, site architecture and the tracking your sales team can act on.