HubSpot Analytics

HubSpot Analytics

HubSpot Analytics is HubSpot's built-in web analytics module tracking visitor behavior across HubSpot-managed websites and landing pages. Scripts record page views, sessions, traffic sources, and conversion events. Sets __hstc and hssc cookies to identify returning visitors and attribute user journeys across sessions for marketing reporting.

Overview

HubSpot Analytics is the web analytics module built into the HubSpot platform, providing traffic reporting, visitor behavior tracking, and marketing attribution data. It shares the same tracking infrastructure as other HubSpot products but is specifically concerned with measuring website performance, traffic sources, and conversion metrics. Most HubSpot customers encounter this as the analytics dashboard that reports on data collected by the HubSpot tracking code.

What This Script Does

HubSpot Analytics relies on the shared HubSpot tracking code (loaded from js.hs-scripts.com) and its associated cookie infrastructure:

  • __hstc — primary tracking cookie containing the visitor's unique ID, first visit timestamp, previous visit timestamp, current visit timestamp, and session count. Set as a first-party cookie with a 13-month expiry.
  • hubspotutk — visitor identity token used for contact recognition across sessions. Submitted with form fills to link anonymous browsing history to identified contacts. 13-month expiry.
  • __hssc — session cookie that tracks the number of pageviews in the current session and the session start timestamp. Resets after 30 minutes of inactivity.
  • __hssrc — session-scoped cookie used to detect whether the visitor has restarted their browser since the last visit.

The analytics module collects and reports on:

  • Traffic sources — direct, organic search, paid search, social, email, and referral traffic with UTM parameter parsing
  • Page performance — pageviews, bounce rates, time on page, and exit rates for each URL
  • Session data — visit frequency, session duration, pages per session, and new vs. returning visitor ratios
  • Conversion events — form submissions, CTA clicks, and custom goal completions
  • Device and geographic data — browser type, operating system, screen resolution, and approximate location from IP address

Data is transmitted to HubSpot's analytics endpoints (js.hs-analytics.net and related domains) and processed into the analytics dashboards visible in the HubSpot portal.

Consent & Compliance

HubSpot Analytics falls under the analytics consent category. Its sole purpose is measuring website visitor behavior and traffic patterns using persistent tracking cookies. Under GDPR, analytics tracking that uses cookies to identify returning visitors and build behavioral profiles requires consent under Article 6(1)(a). While some data protection authorities have suggested that anonymized, aggregated analytics may be pursued under legitimate interest, HubSpot Analytics ties data to individual visitor profiles (via hubspotutk) and links to CRM records, which places it firmly in consent-required territory.

The ePrivacy Directive requires consent before setting the __hstc and hubspotutk cookies, as they are not strictly necessary for delivering the website to the visitor. There is no exemption for analytics cookies under the Directive, unlike the narrow exemption some authorities grant to privacy-friendly analytics tools.

Under CCPA/CPRA, the visitor behavioral data and device information collected by HubSpot Analytics constitutes personal information. Businesses must disclose this collection in their privacy policy and provide mechanisms for consumers to opt out, particularly when the analytics data feeds into marketing automation or is accessible to sales teams through CRM integration.

Should You Block This Without Consent?

Yes. HubSpot Analytics uses persistent tracking cookies to build individual visitor profiles tied to CRM records. This goes beyond privacy-friendly analytics and squarely requires consent. Block the HubSpot tracking code until the visitor consents to analytics cookies.

Visit website

Consent Categories

Analytics

Also Known As

hubspot analyticshubspot trackinghstc cookiehubspot web analyticshubspot reporting

Industries

Programming and Developer SoftwareComputers Electronics and Technology

Frequently Asked Questions

Does HubSpot Analytics require cookie consent?

Yes. HubSpot Analytics uses persistent cookies to build individual visitor profiles tied to CRM records. Unlike privacy-friendly analytics tools, it links browsing history to identified contacts via hubspotutk. Under GDPR and ePrivacy this requires explicit consent. It is classified as analytics and must be blocked until opt-in.

What cookies does HubSpot Analytics set?

HubSpot Analytics sets __hstc (visitor ID, first/last/current visit timestamps, session count — 13-month expiry), hubspotutk (visitor identity token — 13-month expiry), __hssc (session pageview count — 30-minute expiry), and __hssrc (browser restart detection — session). Data is transmitted to js.hs-analytics.net and related HubSpot domains.

How does ConsentStack detect HubSpot Analytics?

ConsentStack detects HubSpot Analytics through the js.hs-scripts.com tracking code and its associated cookie patterns. It classifies the vendor as analytics and blocks all tracking scripts and cookies until the visitor consents. ConsentStack ensures no visitor identification or CRM profile building occurs before explicit opt-in.

Other HubSpot Products

HubSpot Forms
HubSpot Forms
HubSpot Forms is HubSpot's embedded lead capture form tool for collecting contact information on websites. Form scripts submit visitor data directly to HubSpot CRM, creating or updating contact records. Sets cookies to identify form submitters on return visits and pre-populate known contact fields for improved conversion rates.
HubSpot CMS Hub
HubSpot CMS Hub
HubSpot CMS Hub is HubSpot's website content management platform for building and hosting marketing sites. Sites built on CMS Hub automatically include HubSpot's tracking infrastructure, setting cookies for visitor identification, analytics event collection, and marketing attribution across all pages served by the platform.
HubSpot Conversations
HubSpot Conversations
HubSpot Conversations is HubSpot's live chat and chatbot platform embedded on websites. The chat widget script loads asynchronously on page load, sets cookies to identify returning visitors, and captures conversation data linked to HubSpot CRM contact records for sales and support team follow-up and automated nurturing workflows.
HubSpot Email
HubSpot Email
HubSpot Email is HubSpot's email marketing module for sending and tracking campaigns. Tracking pixels embedded in outbound emails report open events and click-throughs back to HubSpot. Recipients who click through to landing pages have subsequent website sessions tracked by HubSpot's web analytics and attribution cookies.
HubSpot Marketing Hub
HubSpot Marketing Hub
HubSpot Marketing Hub is HubSpot's inbound marketing automation platform. Scripts track website visitor behavior for lead identification and nurturing, set cookies to attribute traffic sources, and enable email, social, and ad campaign automation. Visitor behavioral data feeds into HubSpot CRM contact profiles and lifecycle stage scoring.
HubSpot Sales Hub
HubSpot Sales Hub
HubSpot Sales Hub is HubSpot's CRM and sales intelligence platform. The HubSpot tracking script identifies website visitors, monitors which pages prospects view, and surfaces activity data to sales teams. Sets cookies to recognize returning visitors and tie their browsing sessions to CRM contact records for pipeline management.
HubSpot Service Hub
HubSpot Service Hub
HubSpot Service Hub is HubSpot's customer service platform covering ticketing, knowledge base, and customer feedback tools. Tracking scripts associate support interactions and knowledge base page visits with HubSpot CRM contact records. Session cookies persist visitor identity across service touchpoints for context-aware support experiences.

Related Vendors

Google
Google
Google is the dominant provider of web analytics, advertising, and infrastructure tools. Scripts like Google Analytics, Tag Manager, Ads, and reCAPTCHA collect behavioral data, manage tag firing, serve targeted ads, and detect bots. Sets persistent cookies to track users and correlate activity across sites.
Firebase
Firebase
Firebase is Google's mobile and web application development platform offering authentication, real-time database, cloud functions, and analytics. Web SDK scripts initialize Firebase services and may track app events via Firebase Analytics, which is powered by Google Analytics 4. Widely used in single-page apps and PWAs for backend infrastructure and usage tracking.
Google Analytics
Google Analytics
Google Analytics is the world's most widely deployed web analytics platform. Scripts track page views, sessions, user demographics, traffic sources, and conversion events. Drops cookies to identify returning visitors and attribute user journeys across sessions.
Microsoft Dynamics 365
Microsoft Dynamics 365
Microsoft Dynamics 365 is a suite of CRM and ERP applications that integrates with websites through tracking scripts and embedded forms. Web tracking code captures visitor behavior, page views, and form submissions to build customer profiles and score leads. Sets cookies to identify returning visitors and attribute marketing touchpoints across sessions.
Microsoft
Microsoft
Runs Clarity (session recording and heatmaps), the Microsoft Advertising UET tag (conversion tracking), and Bing's remarketing pixel. Clarity injects a recording script that captures mouse movements, clicks, and rage clicks. The UET tag fires conversion events to tie ad clicks to on-site actions across Microsoft's ad network.
LinkedIn Insight Tag
LinkedIn Insight Tag
LinkedIn Insight Tag is a JavaScript tracking pixel for LinkedIn's advertising and analytics platform. The tag fires on every page view to collect URL, referrer, IP address, and device data for conversion tracking, website demographics reporting, and retargeting audience building. Sets cookies to identify LinkedIn members across advertiser websites.

Manage consent for HubSpot Analytics

ConsentStack automatically detects and manages HubSpot Analytics trackers so your site stays compliant with global privacy regulations.