Heap

Heap

Product analytics and behavioral data platform used by growth and product teams. Heap automatically captures all user interactions — clicks, form submissions, page views — without requiring manual event instrumentation. Sets cookies to build retroactive user journey analysis from historical data.

Overview

Heap is a product analytics platform that automatically captures every user interaction on a website or web application without requiring manual event instrumentation. Unlike traditional analytics tools where engineers must code each tracked event in advance, Heap's auto-capture approach records all clicks, form submissions, page views, and UI interactions from the moment the script loads. Product and growth teams use Heap for retroactive funnel analysis, user journey mapping, cohort retention analysis, and feature adoption measurement. Heap also offers session replay capabilities when that feature is enabled.

What This Script Does

The Heap script (cdn.heapanalytics.com/js/heap-[APP_ID].js) initializes the Heap SDK and begins comprehensive event capture immediately:

Auto-capture behavior:

  • Captures every click interaction, including the target element's CSS selector path, text content, element attributes (aria-label, data-* attributes, id, class), and coordinates
  • Records all form field interactions — focus, blur, and change events — along with field metadata. Note: Heap masks input values by default to avoid capturing passwords and sensitive data, but this is configurable.
  • Tracks page views (URL, referrer, page title) on every navigation and route change in single-page applications
  • Captures rage clicks, dead clicks, and scroll depth when session replay is enabled

Cookies and identity:

  • Sets _hp2_id.[APP_ID] (first-party, persistent, 13-month expiry) — the primary user identity cookie storing a pseudonymous Heap user ID
  • Sets _hp2_ses_props.[APP_ID] (first-party, session, expires at session end) — current session metadata including session start time and initial referrer
  • Sets _hp2_hld.[APP_ID] (first-party, 1-day expiry) — used for holdout experiment group assignment

Data transmission:

  • Batches captured events and sends them via POST to heapanalytics.com/api/track at regular intervals and on page unload
  • Each event payload includes: user ID from cookie, session ID, event type, timestamp, element metadata, and page URL

Session replay (if enabled):

  • Records DOM snapshots and mutation events to reconstruct user sessions
  • Captures mouse movements, scroll positions, and viewport dimensions
  • Replay data is transmitted to Heap's servers separately from event data

Retroactive analysis:

  • Heap's data model stores raw event streams, allowing teams to define virtual events (e.g., "clicked Add to Cart") after the fact and apply them to historical data

Consent & Compliance

  • Category: Analytics
  • GDPR/ePrivacy: Heap captures extensive behavioral data and sets persistent cookies for user identification across sessions. The auto-capture model means data collection is broad and continuous. Explicit consent is required under the ePrivacy Directive before the script loads. A data processing agreement with Heap is required. Heap offers EU data residency options.
  • CCPA: Behavioral event data, session data, and the pseudonymous user ID constitutes personal information. Must be disclosed in your privacy policy. Honor opt-out requests by blocking the script.
  • Session replay: If session replay is enabled, the privacy implications are heightened — DOM snapshots may capture sensitive content visible to users. Additional notice to users is advisable.
  • EU-US transfers: Heap is US-based (San Francisco). Transfers rely on Standard Contractual Clauses or the EU-US Data Privacy Framework.

Should You Block This Without Consent?

Yes. Heap's auto-capture approach records all user interactions and sets persistent identifying cookies from the moment it loads. Its broad-by-default data collection model makes prior consent especially important — there is no "minimal" version of Heap that loads without tracking. Block until analytics consent is granted.

Is Heap GDPR compliant?

Heap typically loads analytics trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Heap can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Heap, not on Heap itself.

Visit website

Consent Categories

Also Known As

Heap AnalyticsHeap.ioautocapture analyticsproduct analyticsbehavioral analyticsheap trackingsession analytics

Industries

Programming and Developer SoftwareComputers Electronics and Technology

Tracked Domains (3)

heapanalytics.comAnalytics

heapanalytics.com is an analytics domain operated by Heap, used to measure visits, sessions, and on-site behavior.

heap.ioAnalytics

heap.io is an analytics domain operated by Heap, used to measure visits, sessions, and on-site behavior.

cdn.heapanalytics.comAnalytics

cdn.heapanalytics.com is an analytics domain operated by Heap, used to measure visits, sessions, and on-site behavior.

Cookies Heap Sets (2)

_hp2_id.

Heap visitor identifier suffixed with the environment ID. Two-year expiration.

_hp2_ses_props.

Heap session-properties cookie suffixed with the environment ID.

Frequently Asked Questions

Related Vendors

Annex Cloud
Annex Cloud
Annex Cloud scripts render loyalty program widgets, referral program interfaces, and review collection prompts on e-commerce sites. Scripts track qualifying events such as purchases and referrals to award points and trigger user-generated content collection.
Chorus.ai
Chorus.ai
Chorus.ai, part of ZoomInfo, records and transcribes sales conversations for revenue intelligence. It operates as internal SaaS for sales and CS teams with no scripts loading on customer-facing websites. No direct browser presence for end users.
BigID
BigID
BigID is an enterprise data intelligence platform for privacy, security, and compliance management. It operates as backend SaaS with no scripts loading in end-user browsers or on customer-facing websites. No direct browser presence for site visitors.
Hightouch
Hightouch
Hightouch is a reverse ETL platform that syncs data from warehouses to downstream marketing and analytics tools. It operates entirely as backend infrastructure with no scripts running in end-user browsers or loading on customer-facing websites.
Gong
Gong
Gong is a revenue intelligence platform that records and transcribes sales calls for analysis by revenue teams. It operates as internal SaaS with no scripts loading on customer-facing websites. No direct browser presence for end users.
Blueshift
Blueshift
Blueshift scripts capture behavioral events — page views, clicks, product interactions, and purchases — associating them with user profiles. This data powers cross-channel marketing campaigns including email, SMS, push notifications, and paid retargeting.

Manage consent for Heap

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