Getting your page ready

Getting your page ready...

0%

Thanks for visiting PipelineSync.

Home Solutions Pricing Integrations Resources About Book a free consultation

allentrinidad@pipelinesync.net

INTEGRATIONS • 8 MIN

HubSpot and Google Analytics 4, Set Up Properly

For teams running GA4 alongside HubSpot: how to add GA4 to HubSpot pages with consent intact, how to get form conversions into GA4, and why the two tools will never quite agree.

By the PipelineSync team Updated

PipelineSync field guide

How does HubSpot integrate with Google Analytics?

Through a setting, not an app. Add your GA4 Measurement ID under HubSpot's content settings, for one domain or every domain, and GA4 collects visitor data on your HubSpot-hosted pages, respecting HubSpot's cookie banner. It works on every plan. HubSpot doesn't document bringing GA4 reports into HubSpot, so the two tools report separately.

This guide follows HubSpot's and Google's documentation as of October 2026. If your site isn't hosted on HubSpot, add GA4 through your own site or Tag Manager; HubSpot's tracking code and GA4 then run side by side.

How do you add GA4 to HubSpot pages?

Go to Settings, Content, Pages, pick a domain or the default for all domains, open the Integrations tab, tick Integrate with Google Analytics 4 and enter your Measurement ID. Domain settings override the default. You can paste GA4 code into the site header instead, which needs Marketing Hub Professional or Enterprise, but HubSpot's cookie banner then can't control it.

  1. 01 Measurement IDIntegrations tab
  2. 02 Cookie bannerOpt-in for GA4
  3. 03 Consent modeAdvanced, via HubSpot
  4. 04 Form eventsGA4 or developer
  5. 05 Key eventsMarked in GA4
The recommended setup. Each step is described above and below.
  • Consent: with the Measurement ID setting, GA4 only runs for visitors who opt in, and HubSpot supports Google's advanced consent mode.
  • Tag Manager: you can add a Google Tag Manager ID on the same tab; HubSpot supports basic consent mode for it.
  • Checkout pages: both methods also add tracking to HubSpot payment checkout pages, which you can turn off in payment settings.

How do you track HubSpot form submissions in GA4?

HubSpot doesn't document a native way to send form submissions or lifecycle stages to GA4. GA4's enhanced measurement can record form events automatically, though neither company documents how reliably that works on HubSpot forms. Developers can listen for HubSpot's form submission event in the browser and send a GA4 event such as generate_lead, then mark it as a key event.

  • HubSpot's browser events apply to forms built in HubSpot's updated forms editor.
  • Lead stages: GA4 has recommended lead events, such as qualify_lead, but sending CRM stages needs the Measurement Protocol or a server integration.
  • Google Ads: for ad optimization, HubSpot can send conversions straight to Google Ads; see our Google Ads guide.

Why don't HubSpot and GA4 numbers match?

Because they count differently. HubSpot's documentation points to different session rules, such as sessions restarting at midnight, different source naming, bot filtering, cross-domain tracking and consent. HubSpot also ties visits to known contacts over time. HubSpot recommends comparing trends, not totals, and using each tool for what it does best.

For revenue questions, HubSpot attribution connects touchpoints to deals, with several models on Marketing Hub Professional and Enterprise. GA4 offers data-driven and last-click models. Use consistent UTM parameters so both tools name campaigns the same way; our attribution guide covers the HubSpot side.

Analytics and CRM telling different stories? Bring both to a free 30-minute call and we will check tracking, consent and UTMs.

HubSpot GA4 checklist

✓
Measurement ID added
✓
All domains covered
✓
No duplicate GA4 code
✓
Cookie banner on
✓
Consent mode working
✓
Form events tracked
✓
Key events marked
✓
UTM naming agreed
✓
Internal traffic filtered
✓
Revenue reported in HubSpot

Key takeaway: Add GA4 with HubSpot's Measurement ID setting so consent is respected, track form submissions as GA4 events, use consistent UTMs, and report revenue attribution in HubSpot.

Frequently asked questions

How do you connect Google Analytics 4 to HubSpot?

Add your GA4 Measurement ID in HubSpot's settings, under Content, Pages, on the Integrations tab, for one domain or all domains. GA4 then collects data on visitors to your HubSpot-hosted pages. It's a setting on every HubSpot plan, not a Marketplace app, and it doesn't bring GA4 reports into HubSpot.

Does the HubSpot GA4 integration respect cookie consent?

When added with the Measurement ID setting, yes: HubSpot only runs the Google Analytics script for visitors who opt in through its cookie banner, and supports Google's advanced consent mode. If you paste GA4 code into your site header instead, HubSpot's banner can't control it, so you must handle consent yourself.

Can HubSpot send form submissions to GA4?

HubSpot doesn't document a built-in way to send form submissions or lifecycle stages to GA4. GA4's enhanced measurement can record form events, and developers can listen for HubSpot's form submission events in the browser and send a GA4 event such as generate_lead, or use GA4's Measurement Protocol from a server.

Why don't HubSpot and Google Analytics numbers match?

They measure differently. HubSpot's documentation lists different session rules, source naming, bot filtering, cross-domain tracking and consent as causes, and recommends focusing on trends rather than matching numbers. HubSpot also tracks known contacts across sessions, which GA4 doesn't.

Should you use HubSpot or GA4 for attribution?

Use both for different questions. GA4 shows on-site behavior and campaign traffic, with data-driven and last-click attribution. HubSpot connects touchpoints to contacts, deals and revenue, with several models on Marketing Hub Professional and Enterprise. For pipeline and revenue reporting, HubSpot's attribution is the closer fit.

Sources

HubSpot documentation behind the feature and tier notes above, checked October 2026. HubSpot changes features and tiers often, so check your own portal too.