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.

Overview

HubSpot Marketing Hub is HubSpot's flagship inbound marketing automation platform. Its tracking scripts are among the most commonly encountered on B2B and SaaS websites, providing visitor behavior tracking, lead identification, traffic attribution, and marketing campaign automation. The platform connects website behavioral data directly to HubSpot CRM contact records, making it both an analytics tool and a marketing profiling system.

What This Script Does

Marketing Hub deploys the HubSpot tracking code (loaded from js.hs-scripts.com) which initializes a comprehensive visitor tracking system:

  • __hstc — primary tracking cookie storing visitor ID, first visit timestamp, last visit timestamp, current visit timestamp, and session number. 13-month expiry.
  • hubspotutk — visitor identity token that persists across sessions and is submitted with HubSpot forms to link anonymous browsing history to known contacts. 13-month expiry.
  • __hssc — session-scoped cookie tracking pageview count and session duration. 30-minute expiry.
  • __hssrc — session cookie used to detect browser restarts and new sessions.

Additional scripts are loaded dynamically based on features enabled:

  • js.hscollectedforms.net — non-HubSpot form detection and tracking, which monitors native HTML forms on the page and captures submissions even when the forms are not HubSpot forms
  • js.hs-analytics.net — analytics event collection module
  • js.hs-banner.com — HubSpot's own cookie consent banner (if enabled)

The tracking script collects page URLs, referral sources, UTM parameters, search keywords, device and browser metadata, and custom behavioral events. This data feeds into:

  • Traffic analytics — source attribution, page performance, conversion funnels
  • Lead scoring — visitor engagement scores based on page views and content interactions
  • Marketing automation triggers — workflows that fire based on page visits (e.g., sending an email when a visitor views the pricing page three times)
  • CRM contact enrichment — browsing history is appended to contact records, visible to sales teams

When a visitor submits a HubSpot form or is identified via email click-through, their entire anonymous browsing history is retroactively linked to their contact record.

Consent & Compliance

Marketing Hub is classified under marketing and analytics. Its tracking scripts serve dual purposes: website analytics and marketing automation. Under GDPR, both purposes require consent. The behavioral profiling that links browsing history to CRM contact records, triggers automated marketing workflows, and scores leads based on page engagement constitutes processing that requires explicit consent under Article 6(1)(a). Legitimate interest is a weak basis here given the scope of profiling.

The ePrivacy Directive requires consent for the __hstc and hubspotutk cookies, as they are persistent tracking cookies used for analytics and marketing — not strictly necessary for any service the user has requested.

Under CCPA/CPRA, the collected behavioral data is personal information. The retroactive linking of anonymous browsing to identified contacts, and the use of this data for automated marketing, constitutes data processing that must be disclosed. If behavioral data is shared with advertising platforms through HubSpot's ad integrations, this likely qualifies as "sharing" under CPRA.

Should You Block This Without Consent?

Yes. Marketing Hub's tracking scripts exist to collect behavioral data for marketing automation and lead profiling. None of this functionality is necessary for the website to operate. All HubSpot tracking scripts must be blocked until the visitor provides explicit consent for marketing and analytics cookies.

Visit website

Consent Categories

Marketing
Analytics

Also Known As

hubspot marketingmarketing hubhubspot inboundhubspot automationhubspot marketing tracking

Industries

Programming and Developer SoftwareComputers Electronics and Technology

Tracked Domains (1)

hsbenchmarks.comMarketing

Frequently Asked Questions

Is consent required for HubSpot Marketing Hub?

Yes. HubSpot Marketing Hub sets persistent tracking cookies for behavioral profiling, lead scoring, and marketing automation. Under GDPR and ePrivacy, both the analytics and marketing purposes require explicit consent. The retroactive linking of browsing history to identified contacts makes this a high-priority consent item.

What cookies does HubSpot Marketing Hub set?

Marketing Hub sets __hstc (visitor ID plus visit timestamps, 13-month expiry), hubspotutk (identity token, 13-month expiry), __hssc (session pageview count, 30 minutes), and __hssrc (session). Additional scripts load from js.hscollectedforms.net for native form monitoring and js.hs-analytics.net for event collection.

How does ConsentStack handle HubSpot Marketing Hub?

ConsentStack identifies Marketing Hub through js.hs-scripts.com and classifies it as marketing and analytics. All scripts are blocked until the visitor explicitly consents. ConsentStack prevents non-HubSpot form monitoring, anonymous-to-contact linking, and marketing automation triggers from firing before consent is granted.

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 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.
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 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 Ads
Google Ads
Google Ads is Google's advertising platform for search, display, and remarketing campaigns. Conversion tracking scripts fire on advertiser landing pages to measure actions taken after ad clicks. The remarketing tag builds audience lists for retargeting users across Google's ad network.
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.
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.
Microsoft Advertising UET Tag
Microsoft Advertising UET Tag
Microsoft Advertising UET Tag is the Universal Event Tracking pixel for Microsoft's ad platform, formerly Bing Ads. The JavaScript tag fires on advertiser websites to track page views, conversions, and custom events for campaign optimization. Sets cookies to identify visitors across sessions and attribute conversions to Microsoft Search and Audience Network ad clicks.
LinkedIn Ads
LinkedIn Ads
LinkedIn Ads is LinkedIn's advertising platform for B2B marketing and professional audience targeting. Conversion tracking scripts and pixels fire on advertiser websites to measure sign-ups, downloads, and purchases driven by LinkedIn ad campaigns. Sets cookies for audience matching, retargeting list building, and cross-device attribution reporting.

Manage consent for HubSpot Marketing Hub

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