Skip to content
  • There are no suggestions because the search field is empty.

HubSpot website analytics: configuring tracking and understanding reports

Understand how HubSpot tracks website activity, how to configure reliable analytics and why its figures may differ from Google Analytics.

HubSpot website analytics: configuring tracking and understanding reports

HubSpot website analytics uses the HubSpot tracking code to collect information about website traffic, visitor activity and traffic sources.

This information can support marketing analysis and, where HubSpot can identify a visitor, connect website behaviour with CRM records and customer journeys.

Reliable analytics depends on the tracking code, domains, traffic exclusions, consent controls and reporting settings being configured and maintained correctly.

What HubSpot website analytics can measure

Depending on your subscription and configuration, HubSpot’s analytics tools can help you understand:

  • Website sessions and page views
  • Traffic sources
  • Visitor activity
  • Landing-page and website performance
  • Form submissions and conversions
  • Contacts created through digital activity
  • Campaign and channel performance
  • Attribution across marketing and revenue activity
  • Website behaviour associated with CRM records

The reports and level of detail available depend on your HubSpot subscription, installed tracking and available data.

Website analytics can also be presented through HubSpot dashboards alongside CRM, marketing, sales and service reporting.

The HubSpot tracking code

The HubSpot tracking code is a JavaScript snippet unique to your HubSpot account.

It is automatically included on HubSpot-hosted blog posts, landing pages and website pages. It must normally be installed separately on pages hosted outside HubSpot.

On externally hosted pages, the tracking code can:

  • Record website traffic and visitor activity
  • Associate the website with your HubSpot account
  • Support the capture of eligible non-HubSpot form submissions
  • Enable tools that depend on the code, such as supported chat widgets
  • Help associate activity with CRM contacts where identification is possible

If the code is missing from a page, HubSpot cannot track traffic, page views, site events or visitor activity from that page.

See Install the HubSpot tracking code.

Install the code consistently

The tracking code should be deployed across every relevant page you intend to include in HubSpot analytics.

Common implementation methods include:

  • Adding the code to a shared website template or footer
  • Installing it through Google Tag Manager
  • Using HubSpot’s WordPress plugin
  • Adding it through another content-management system
  • Using a platform-specific integration

Do not install more than one HubSpot tracking code on the same page. If multiple codes are present, the first code to load will fire and subsequent codes will not load correctly.

After installation:

  • Confirm that the code appears on all intended pages
  • Check that the correct HubSpot account code has been used
  • Verify that page views are reaching HubSpot
  • Review browser errors and consent behaviour
  • Test forms, chat and other tools that depend on the code
  • Repeat checks after website-template or tag-manager changes

Add externally hosted domains to HubSpot

Installing the tracking code on an external website is only part of the setup.

Externally hosted domains and subdomains should also be added to the relevant HubSpot tracking and reporting settings so their traffic is included and categorised appropriately.

Review:

  • Root domains
  • www and non-www versions
  • Subdomains
  • Regional or language-specific sites
  • Campaign microsites
  • External landing-page platforms
  • Customer or member portals where tracking is intended
  • Test and staging environments

Only include domains that should contribute to your reporting. Incorrect or incomplete domain configuration can result in missing, fragmented or misleading data.

Single-page applications

Single-page applications can change content and URLs without performing a traditional full-page reload.

Standard tracking-code installation may therefore be insufficient for recording every intended page view or navigation event.

A developer may need to use HubSpot’s tracking-code API to notify HubSpot when routes or page content change.

Define what should count as a page view or event before implementation, then test the behaviour across representative user journeys.

Embedded and third-party content

Embedded forms, booking tools, videos, iframes and other third-party components may use their own tracking methods.

Consider:

  • Whether activity occurs on your website or inside an embedded service
  • Which platform records the interaction
  • Whether the visitor remains identifiable
  • Whether consent preferences are passed to the embedded service
  • Whether the activity needs to be recorded as a custom event
  • Whether cross-domain behaviour affects session reporting

Do not assume that installing the HubSpot tracking code automatically captures every interaction within third-party content.

Filter internal and non-customer traffic

Visits from employees, agencies, developers and other internal users can distort website analytics.

HubSpot allows traffic to be excluded using IP addresses and other available filtering options.

Consider excluding:

  • Office networks
  • Agency or development-team traffic
  • Known home-office addresses where appropriate
  • Staging and test activity
  • Monitoring or automated traffic that should not contribute to reporting

IP addresses can change, particularly where people work remotely or use dynamic connections. Review exclusions periodically and document why each exclusion exists.

Traffic excluded after it has already been recorded may not be removed retrospectively. Configure exclusions as early as practical.

See Exclude traffic from your site analytics.

Privacy and cookie consent

The HubSpot tracking code collects visitor information. Its use should therefore be considered within your organisation’s privacy, cookie and consent framework.

Consent settings can affect:

  • Whether optional tracking cookies are placed
  • Whether HubSpot can recognise a returning visitor
  • Whether page-view activity is associated with a contact
  • How complete traffic and attribution reports appear
  • Whether connected analytics and advertising tools can run

If a visitor rejects or blocks tracking cookies, HubSpot may be unable to recognise them or associate their website activity with a CRM record.

Your organisation should decide which consent model applies, approve the relevant wording and ensure that manually installed scripts follow the intended behaviour.

HubSpot’s account settings also include controls relating to how tracking-code data may be shared with HubSpot for product and service improvement. Review those settings as part of your privacy assessment.

Understand anonymous and identified visitors

Not every website visitor will be associated with a CRM contact.

A visitor may remain anonymous until HubSpot can identify them through an eligible interaction, such as submitting a form with a trackable browser.

Even after identification, historic or future activity may be affected by:

  • Cookie consent
  • Browser restrictions
  • Deleted or blocked cookies
  • Use of different devices or browsers
  • Private browsing
  • Ad blockers
  • Shared devices
  • Tracking-code or form configuration

Avoid assuming that every website interaction can be attributed to a known person.

HubSpot Analytics and Google Analytics

HubSpot Analytics and Google Analytics are separate analytics systems.

They use different tracking codes, data models, attribution methods and reporting definitions. They are therefore suited to different questions.

HubSpot Analytics

HubSpot Analytics is particularly useful for understanding website and marketing activity in the context of CRM data.

Depending on your subscriptions and data, it can help analyse:

  • Contact creation
  • Lifecycle progression
  • Campaign performance
  • Marketing conversions
  • Attribution connected with contacts, deals and revenue
  • Website activity associated with known CRM records

Google Analytics

Google Analytics is primarily designed to analyse website and application usage.

It can provide insight into areas such as:

  • Page and screen views
  • Sessions and users
  • Events and engagement
  • Acquisition channels
  • Website journeys
  • Advertising and media performance

Adding Google Analytics tracking to HubSpot-hosted pages allows those pages to send data to Google Analytics. It does not merge the two analytics systems or make their metrics directly interchangeable.

Why the figures differ

Differences between HubSpot and Google Analytics are normal.

They can be caused by:

  • Different definitions of users, visitors and sessions
  • Different tracking and identity methods
  • Cookie consent choices
  • Browser privacy controls and ad blockers
  • Different bot and internal-traffic filtering
  • Time-zone settings
  • Cross-domain configuration
  • Different attribution models
  • Tracking-code coverage
  • Processing delays
  • Anonymous visitors compared with CRM-identified contacts

Before comparing figures, define the metric, date range, time zone, domain scope, filters and attribution model being used in each platform.

The aim should not be to force identical totals. Instead, decide which system is authoritative for each reporting question.

For further guidance, see Why HubSpot and Google Analytics do not match.

Establish reporting ownership

Your organisation should define:

  • Which domains and pages should be tracked
  • Which events and conversions matter
  • Which traffic should be excluded
  • Which consent model applies
  • Who owns tag and tracking changes
  • Which platform is authoritative for each metric
  • How reporting definitions are documented
  • How frequently the implementation is checked

Without clear ownership, website changes can break tracking or introduce conflicting definitions without being noticed.

What can Forbidden help with?

Forbidden can help install and validate the HubSpot tracking code, review domain coverage, configure HubSpot traffic exclusions and connect website activity with relevant CRM reporting.

We can also help define reporting requirements and investigate differences between HubSpot and other analytics tools.

Your organisation remains responsible for approving its cookie and privacy approach, deciding which tools and visitors should be tracked, and determining which metrics will be used for business decisions.

Further information