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.
Consent Categories
Also Known As
Industries
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
Related Vendors
Manage consent for HubSpot Analytics
ConsentStack automatically detects and manages HubSpot Analytics trackers so your site stays compliant with global privacy regulations.