Why this integration is harder than it looks
HubSpot and GA4 both track user behavior, but they use different data models, different identity resolution approaches, and different attribution logic. HubSpot tracks contacts — it knows who filled out a form, what emails they opened, and what pages they visited after becoming a known contact. GA4 tracks sessions — it knows how many people visited certain pages, what they clicked, and how long they stayed, but typically doesn't know who they are.
The integration challenge is connecting these two views of the same user journey. When someone visits your site three times over two weeks, reads a case study, then fills out a contact form, both HubSpot and GA4 should be able to tell that story coherently.
UTM parameters: the critical link
UTM parameters are the foundation of any multi-tool attribution setup. They're URL parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term) that tag inbound links so analytics tools can attribute sessions to specific campaigns.
Both GA4 and HubSpot read UTM parameters. GA4 uses them for session attribution in acquisition reports. HubSpot stores them as contact properties (Original Source, Latest Source, and their drill-downs) when a contact converts. If you're using UTMs consistently on all paid and email links, both systems will have consistent source data.
Common mistakes: not using UTMs on email links (HubSpot sends without them by default unless you configure them), inconsistent campaign naming across channels (GA4 and HubSpot show different values because different team members tagged the same campaign differently), and UTMs being stripped by redirects before reaching the landing page.
Setting up the native connection
HubSpot has a native Google Analytics integration in Settings → Tracking & Analytics → Google Analytics. This connection:
- Embeds the GA4 tracking code on HubSpot-hosted pages (landing pages, blog, knowledge base) so you don't need GTM on those pages separately.
- Can push HubSpot form submission events to GA4 as conversions.
- Passes HubSpot contact data to GA4 user properties (if you enable this — note privacy implications).
What the native connection doesn't do: it doesn't handle the full custom event tracking you'd configure via GTM on your main site. If your contact form is on your main site (not a HubSpot landing page), you still need GTM tracking there. And if you want rich GA4 event data for things like video plays, scroll depth, or navigation patterns, GTM is still the right tool regardless of the native connection.
Cross-domain tracking
Many B2B companies have their main site on one domain (company.com) and their HubSpot landing pages on a different subdomain or domain (pages.company.com or company.hs-sites.com). When a user moves between these domains, GA4 treats it as a new session by default — losing the referral source and breaking the attribution chain.
Cross-domain tracking in GA4 tells it to treat specified domains as the same property and carry the session across. Configure this in GA4's data stream settings under "Configure tag settings" → "Configure your domains." List every domain that should be treated as the same site.
You also need to ensure your GTM container is on the HubSpot pages. For HubSpot-hosted pages, you can add custom code in Settings → Website → Pages → Custom Code to include GTM. Then your GA4 cross-domain configuration applies consistently.
Passing the HubSpot contact record to GA4
When a visitor fills out a HubSpot form and becomes a known contact, you can pass that contact's HubSpot ID or lifecycle stage to GA4 as a user property. This allows you to segment GA4 data by CRM lifecycle stage — showing, for example, which content pages are most visited by contacts who went on to become SQL (Sales Qualified Lead) or Customer.
This is done via a HubSpot workflow that fires a data layer event after form submission, which GTM picks up and uses to set a GA4 user property. The implementation requires coordination between HubSpot workflows, GTM, and GA4 custom dimensions.
Important caveat: sending CRM identifiers to GA4 creates a bridge between your analytics data and your CRM data. This has privacy implications under GDPR and CCPA — you should review this with your legal team and ensure it's covered in your privacy policy and consent flows.
What a well-integrated setup looks like
In an ideal setup, here's what you can answer with HubSpot + GA4 working together:
- GA4: Which channels drove sessions? What pages do pre-conversion visitors read? What content do high-intent visitors engage with?
- HubSpot: Which contacts converted from which channel (via UTM properties)? What was their path from MQL to SQL to Closed Won? Which content assets influenced deal progression?
- Combined: Which traffic sources produce contacts that close? What is the time-to-close by acquisition channel? Which content pages correlate with higher deal values?
Getting to that combined view takes deliberate setup. But once it's working, it's the closest thing to full-funnel visibility that a typical B2B marketing stack can provide.
Need HubSpot and GA4 integrated cleanly?
I set up the full integration — UTM standards, cross-domain tracking, event taxonomy alignment, and CRM-to-analytics connectors — so both systems tell the same story.
Get a quote