Reports

Why do HubSpot and Google Analytics not match?

Last updated: December 1, 2017

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A
When looking at your results from HubSpot and Google Analytics, we recommend focusing on the trends between the two systems — not comparing X visits from Google Analytics to Y visits in HubSpot. Below are example reports from HubSpot and Google Analytics. The overall traffic trends remain consistent, even though the tools do not display the same number of sessions.

HubSpot Analytics:


HubSpot Visits Overview

Google Analytics:


Google Analytics Overview

If you see unexpected results when analyzing the trends of the tools, there are several factors that could be causing inconsistencies: 

Sessions

In HubSpot, sessions encompass a series of analytics activities taken by a visitor to your website. Activities can include page views, CTA clicks, events, and more. A session expires after 30 minutes of inactivity. New sessions begin when a visitor returns to your site after 30 minutes of activity or with a new session campaign (e.g., the visitor returns to your site from a different traffic source). You can find sessions data in your web analytics dashboard.

Please keep in mind that if you have the Notify visitors that your site uses cookies and allow opt-out setting enabled, visitors who opt out of cookies will not be tracked across page views and each new page view will be considered a new session. This may result in more sessions in HubSpot. However, if a visitor has cookies turned off or has an adblocker installed (which prevents HubSpot from tracking page views), and that visitor submits a form, tracking sessions can infer more of the context around that submission and can more accurately record the source of that form submission. 

In Google Analytics, a session is counted anytime someone reaches your site from a referring source within a given time frame. That means that the visitor was on an external site and clicked on a link from a unique source that took them to your site or typed your site into their browser directly. Once a visitor reaches your site, all of their interactions are considered the same visit until the source changes or the session ends (after 30 minutes of inactivity or at midnight  this timeout can be customized within your Google Analytics account settings). 

Please note: while HubSpot session numbers can be closely aligned with Google Analytics session numbers, these two numbers are not expected to match exactly.

IP filtering

To block your own traffic to your website from being counted towards your metrics, analytics packages recommend filtering IP addresses. HubSpot and Google Analytics should block the same IP addresses to ensure that internal traffic is filtered consistently. Learn more about filtering internal traffic in HubSpot and in Google Analytics.

Tracking code installation

If the HubSpot or Google Analytics tracking codes are not installed on the same pages on your site, then the tools will not be recording sessions for the same number of pages. Learn how to install the HubSpot tracking code on non-HubSpot pages (the code is already installed on any pages created in HubSpot). Learn how to install the Google Analytics tracking code on HubSpot pages or on non-HubSpot pages.

Source of sessions

HubSpot measures a session based on the referral domain (google.com, facebook.com, cnn.com, etc.) that brings a visitor to your site. Google Analytics measures a session based on the referral source/medium (google/organic, direct/none, facebook/referral) that brings a visitor to your site. This will result in some interactions counting as separate sessions in one tool, but a single session in the other.

Cross-domain tracking

Cross domain tracking allows you to aggregate analytics across multiple tracked domains. If a visitor clicks on a link to visit domain1.com and then clicks on a link to visit domain2.com, cross-domain tracking ensures that the interaction is counted as the same session. Without cross-domain tracking, most analytics packages would consider this interaction as two separate sessions because the referral domain/source changes. If HubSpot and Google Analytics do not have the same domains enabled for cross-domain tracking, then the tools will not report consistent sessions. Learn how to enable cross-domain tracking in HubSpot and in Google Analytics.

Please note: Google Analytics may require a more advanced setup for cross-domain tracking, which is not supported by HubSpot Support; contact your web developer or use Google's support forum for additional information.

In-app traffic

The HubSpot tracking code is automatically prevented from firing on preview pages within your HubSpot tools (e.g., https://preview.hs-sites.com/_hcms/preview/content/...) or content editors (i.e., anything on the domain app.hubspot.com). This is to ensure that sessions and page views are not counted during testing and content creation.

However, because the Google Analytics tracking code is added to the header HTML of a HubSpot page, it may count sessions to these in-app pages. If you see results in Google Analytics with referrals from the above URLs, then you may see more sessions in Google Analytics than HubSpot. To prevent preview pages from counting in Google Analytics, we recommend filtering the IP addresses of any internal users in Google Analytics.

Was this article helpful?