What to do if HubSpot analytics and Google analytics don't match?
Why HubSpot and Google Analytics data may differ, and how to interpret the discrepancies with confidence.
When looking at results from HubSpot and Google Analytics, we'd recommend focusing on the trends between the two systems, instead of comparing X visits from Google Analytics to Y visits in HubSpot.
While HubSpot analytics data can be closely aligned with Google Analytics data, it isn't expected to be an exact match.
If you're seeing unexpected results when looking at the trends of your reporting tools, then several factors could be causing inconsistencies:
Sessions
HubSpot
- In HubSpot, a session tracks a user's activities on your website.
- This includes things like:
- Page views
- CTA clicks
- Events
- A session ends after thirty minutes of inactivity on the site
- If the user returns after thirty minutes, or from a different traffic source (e.g. they visited from an email in one session, but Facebook from another), a new session starts
- Sessions also reset at midnight (based on the account's timezone)
If a user visits your website at 23:59, and returns at 00:01, then a new session will be counted.
Google Analytics
- In Google Analytics, a session starts when a user visits your website from an external link or by typing your URL directly
- It ends after 30 minutes of inactivity (depending on timeout settings)
Unlike in HubSpot, sessions don't reset at midnight. New campaign parameters don't start a new session.
- If a user returns to your site after a timeout, then a new session begins
IP and bot filtering
- HubSpot recommends blocking your own traffic to your website, so as not to skew any metrics
- Analytics also recommends filtering IP addresses, too
- HubSpot and Google Analytics should block the same IP addresses to ensure that internal traffic is filtered consistently
- HubSpot and Google Analytics also have bot filtering settings
HubSpot may detect bots differently to Google Analytics, which may lead to inconsistencies in tracked traffic
Tracking code installation
- HubSpot has its own tracking code
- Google Analytics has its own tracking code
- If the HubSpot or Google Analytics tracking codes are not installed on the same pages, then the tools will not record sessions for the same number of pages
Source of sessions
- HubSpot tracks sessions by the referral domain (e.g., com, facebook.com)
- Google Analytics tracks sessions by source and medium (e.g., Google/organic, direct/none, Facebook/referral)
This means some visits may be counted as separate sessions in one tool but as a single session in the other.
- HubSpot and Google Analytics also group metrics differently:
- HubSpot assigns Google Ads traffic to Paid Search
- Google Analytics can split Google Ads traffic into Paid Search, Video, Social, Cross-network, or Display
- In HubSpot, if the source changes, like from an ad click or an email link, a new session starts.
Cross-domain tracking
- Cross-domain tracking lets you gather analytics across multiple domains
- If a visitor moves from com to domain2.com, cross-domain tracking treats it as one session
- Without it, most analytics tools count this as two separate sessions because the referral source changes
If HubSpot and Google Analytics don’t have the same domains set up for cross-domain tracking, the session counts will differ
In-app traffic
- The HubSpot tracking code won’t fire on preview pages (e.g., https://preview.hs-sites.com) or in content editors (hubspot.com)
- This avoids counting sessions and page views during testing. Google Analytics, however, may still track these pages since its code is added to the header HTML
- To avoid this, set up filters in Google Analytics to exclude internal IP addresses
If you see sessions in Google Analytics from these URLs, it could lead to higher session counts compared to HubSpot