Open-source alternative to Hotjar heatmaps

Hotjar's heatmaps can be replaced with self-hosted PostHog or OpenReplay, or with Matomo's paid heatmap plugin on a Matomo you already run. This page compares licensing, masking, consent impact and migration effort.

On this page

Which open-source option replaces Hotjar heatmaps?

Hotjar is now part of Contentsquare and new Hotjar accounts can no longer be created, so teams that rely on heatmaps need a new home for them. The short answer: self-hosted PostHog and OpenReplay both include heatmaps inside their product analytics, while Matomo offers heatmaps only through its paid Heatmap and Session Recording plugin, licensed per user under the InnoCraft EULA rather than the GPL, on a Matomo instance you already run or plan to run. Your choice depends less on the heatmap itself than on what else you need: session replay, on-site surveys, funnels and event-level product analytics. If you need all of those on one self-hosted stack, PostHog covers the widest set. If your main need is replay and heatmaps with strong devtools, OpenReplay is the narrower fit. If you already run Matomo for web analytics and only need heatmaps added, the plugin keeps the footprint small, though you will need to confirm its per-user cost with the vendor.

Before you pick a tool, settle the two constraints that decide whether heatmaps are usable at all. The first is masking. Heatmaps and recordings capture what users click and see, so form fields, account pages and personal data must be excluded at capture time. OpenReplay describes sanitization that masks or skips data before it reaches its server, including masking by CSS selector and a private mode that masks all text and inputs by default. Confirm the equivalent controls in PostHog and the Matomo plugin in your own test environment before you rely on them. The second is consent. Matomo's ePrivacy FAQ notes that French guidance treats heatmaps and session recordings as removing the consent exemption that some privacy-focused analytics otherwise enjoy, so a heatmap in an EU deployment may require a consent banner. Ask your legal or privacy team to confirm this for each market you serve.

Run a short proof of concept on one high-traffic page before committing. Install the tracker in a staging copy of the site, set masking rules, collect heatmaps for a representative period and check that clicks and scroll depth match what you see in Hotjar. Record which features you could not reproduce, such as Hotjar's on-site surveys, which OpenReplay's own comparison notes as a gap, and whether you can accept that gap or need a separate tool. Also confirm the license status of the components you will run. PostHog's ee directory and OpenReplay's ee directory each need a separate license for premium features on self-hosted instances, so check which heatmap features sit in the free code before you design around them.

How Hotjar heatmap capabilities map to open-source options

This table maps the heatmap capabilities teams usually depend on in Hotjar to PostHog, OpenReplay and Matomo with its paid Heatmap and Session Recording plugin. Each cell states what the platform documents and what you should confirm in a trial before you commit, because the supplied facts do not settle every detail. The main takeaway is that heatmap support, masking and consent impact vary by platform, so verify each row against your own pages.

CapabilityPostHog (self-hosted)OpenReplay (self-hosted)Matomo with Heatmap and Session Recording plugin
Click heatmapsListed under product analytics heatmaps in the README. Confirm click capture on your framework and single-page app routes.Heatmaps are listed under product analytics. Confirm click, scroll and move types in your deployed version.Provided by the paid premium plugin, sold per number of users under the InnoCraft EULA. Confirm the heatmap types included in your plan.
Scroll and move heatmapsConfirm whether scroll depth and mouse movement heatmaps are available in your version, since the README only lists heatmaps generally.Confirm scroll and move heatmap support in the release you install, since the README does not break out types.Confirm which heatmap types the plugin offers. Ask the vendor before assuming parity with Hotjar.
Segmentation by page and deviceProduct analytics supports filtering. Confirm page-level and device-level heatmap filters in the heatmap view.Confirm whether heatmaps can be filtered by page URL and device type in your deployment.Confirm page and device segmentation in the plugin. Matomo segmentation on imported Google Analytics history does not work, per Matomo's import limitations.
Linking heatmaps to recordingsSession replay is part of the same product suite. Confirm that you can open a recording from a heatmap view.Session replay and product analytics sit in one product. Confirm the navigation path from a heatmap to its sessions.Confirm whether the plugin links heatmap data to session recordings in the Matomo interface.
Input maskingConfirm masking settings for form inputs and sensitive elements before enabling heatmap capture on forms.Capture-time sanitization masks or skips data before it reaches the server, including CSS selector masking and input redaction. Private mode masks all text and inputs by default.Confirm which elements the plugin masks. Matomo's ePrivacy FAQ says adding heatmaps removes the CNIL consent exemption, so masking alone does not settle compliance.
Consent handlingRequires a consent review for EU visitors. Confirm the consent mode and cookie behavior your legal team needs.Self-hosting keeps data in your infrastructure. Consent still depends on your configuration and jurisdiction, so confirm with counsel.Adding heatmaps removes the CNIL consent exemption for audience measurement, so heatmap visitors need consent under CNIL's guidance.
Hosting locationSelf-hosted on your servers. Confirm the region and storage location of your database and event store.Session data stays in the operator's infrastructure. Deployment targets include AWS, Google Cloud, Azure and on-premises options.Self-hosted on your servers. Matomo's requirements call for separate app and database servers at higher traffic, which affects where data sits.
Licensing for heatmap featuresMIT for most code, but the ee directory needs a PostHog license for premium features on self-hosted instances. Confirm which heatmap features sit in ee.Mostly AGPLv3 with MIT directories. The ee directory is under a commercial license. Confirm whether your heatmap features need the Enterprise edition.Matomo core is GPLv3, but the heatmap plugin is paid under the InnoCraft EULA. Budget for per-user licensing on top of hosting.

PostHog, OpenReplay or Matomo: when each option fits

Each option covers heatmaps differently, carries a different license split, and asks for a different amount of work from your team. The cards below compare them on the points that matter during a Hotjar replacement: what is free, what is paid, who supports the self-hosted install, and what consent rules apply to what you collect.

PostHog self-hosted

PostHog is MIT licensed except for its ee directory, which needs a PostHog license for premium features on a self-hosted instance. Heatmaps sit inside its product analytics, next to session replay, surveys and feature flags, so one install covers several Hotjar jobs. The free Docker Compose hobby deployment is MIT licensed, and PostHog does not offer customer support for self-hosted instances, so you need an internal or partner owner for upgrades and incidents. Confirm which features you need sit outside the ee directory before you commit.

Events per month guidance
100k
Self-host docs

OpenReplay self-hosted

OpenReplay's monorepo is mostly AGPLv3, with some MIT directories and an ee directory under a separate commercial license. Its product analytics includes heatmaps alongside session replay, DevTools and cobrowsing, and its capture-time sanitization masks data before it reaches the server. Self-hosting starts on a single VM, but AGPLv3 obligations apply if you modify and offer the software to users, and SSO, SCIM and audit trail sit in the Enterprise edition. Check whether the heatmap features you rely on are in the open-source directories.

Deployment docs

Matomo with the heatmap plugin

Matomo is GPLv3, and its On-Premise Community edition is free with unlimited users and hits. Heatmaps and session recording are not in that edition: they come from the Heatmap and Session Recording plugin, a paid premium plugin sold per number of users under the InnoCraft EULA, with a 30-day free trial. Every added user raises the plugin cost, so price it against your analyst headcount. Matomo is the option that fits when you already run it for web analytics, and CNIL notes that heatmaps and session recordings remove the consent exemption for analytics trackers.

Plugin listing

Support model and who runs it

PostHog states that self-hosted deployments are officially unsupported, OpenReplay offers community support on its open-source edition and paid support only on Enterprise, and Matomo offers forum support on Community. Each option therefore leaves a support gap that your team or an implementation partner must fill. Ask each vendor, in writing, what support is included for your edition before you size the team that will run it.

Consent and data location

Heatmaps and recordings change how a tracker is classified under French and EU guidance, so the choice affects your consent banner as well as your tooling. Matomo's ePrivacy FAQ says heatmaps or session recordings remove the CNIL exemption for audience measurement. Self-hosting keeps session data on infrastructure you control, but you still need masking, retention limits and a documented legal basis. Have your privacy team confirm the classification for each option before the pilot starts.

How the heatmap tracker, self-hosted server and consent layer fit together

The flow starts in the visitor's browser, where the tracking snippet loads only after the consent layer allows it. Events travel through an optional reverse proxy on the organization's own domain to a self-hosted PostHog or OpenReplay server, and then into storage that stays inside the client's infrastructure. Check that masking runs before data leaves the browser, that the consent gate blocks heatmap capture until the visitor agrees, and that the trust boundary matches where your servers actually run.

Consent gates the snippet, which sends masked events to storage inside the client's boundary.

Running heatmaps alongside Google Analytics or an existing Matomo

Plan the overlap before you install anything: a heatmap tool sits next to your web analytics, it does not replace it, and the two rarely share data. If you run Google Analytics, the history you can move is limited. Matomo's Google Analytics Importer brings over only aggregated report data, not raw visits and actions, so the Visitor Log, segmentation and Custom Reports do not work on imported history, and some reports such as Funnels are not imported. Confirm in your own environment which reports you need from the old property, export them while the source is still accessible, and store them outside the new tool. If you already run Matomo and add a heatmap or session recording plugin, your existing raw visit data stays in place, but the heatmap data starts at the install date.

Running two trackers at once during the overlap has a consent cost that teams often miss. Each script that sets cookies or collects identifiers may need its own disclosure and consent treatment, so a visitor can see two banners, or a banner that lists vendors you have already removed. Inventory every tag on the site, record which consent category each one falls under, and make sure the consent management platform blocks the new heatmap tracker until the visitor agrees. Ask your legal or privacy team to confirm the wording, since the Matomo FAQ on ePrivacy notes that adding heatmaps or session recordings removes the CNIL audience measurement exemption that a basic Matomo setup may have relied on.

Set a fixed end date for the overlap and a rule for each side. Keep the old tracker running only long enough to compare a sample of pages, then remove its snippet and its consent entry in the same change. Have someone check that duplicate prompts are gone on a clean browser session in each target market, and confirm that the masking settings on the new heatmap tool apply to form fields and account pages before any traffic is recorded. A written decision on who owns the tag inventory and who signs off on consent changes will prevent the common failure where an old script stays live for years.

Migrating from Hotjar heatmaps without losing the reporting history

This sequence moves heatmap reporting from Hotjar to a self-hosted tool in a controlled order, so the team knows what history is lost, what is rebuilt, and when each consent and masking decision is final before the switch.

  1. Export what Hotjar allows

    The team owner exports whatever Hotjar makes available for each site, such as heatmap screenshots, survey responses and notes, and stores them in the organization's own storage. Confirm the export options in the Hotjar account directly, since features may change at Contentsquare's discretion. The step is done when every site has a dated export and a written list of the pages and reports covered.

  2. Confirm what will not carry over

    Document that historical heatmaps and recordings do not move into the new tool. PostHog's managed migrations import historical events from Mixpanel and Amplitude, not from Hotjar, so heatmap history is rebuilt from new traffic rather than imported. Ask the business owners to sign off on this loss and to keep the Hotjar export as the reference for past comparisons. The step is done when stakeholders have accepted the gap in writing.

  3. Define masking rules and the page list

    Choose the pages to track first and list the form fields, account areas and personal data that must be masked or excluded before any click or scroll is captured. Check how the chosen tool handles masking, including CSS selector masking and any private mode it offers, and confirm these in its documentation before relying on them. The step is done when a signed-off masking specification and page list exist for each site.

  4. Install the tracker on a staging site

    The web team installs the chosen tool's tracking code on a staging copy of the site, applies the masking rules and confirms that heatmap data and events appear in the self-hosted dashboard. Test the most sensitive pages, including logged-in and form pages, and check that no typed values or personal data reach the server. The step is done when the test pages show the expected aggregates and the masking checks pass.

  5. Set consent and retention

    The privacy and legal leads decide whether a consent banner is needed, based on the tool's configuration, the audience and the national rules that apply to each market. For French sites, the CNIL conditions for analytics exemption should be checked against the setup, and the retention period is set in the tool and recorded in the privacy notice. The step is done when a written decision on consent and retention is filed with the configuration settings.

  6. Run both tools for a short overlap

    The team keeps the Hotjar snippet and the new tracker live together for an agreed overlap period, then compares heatmap click and scroll patterns on the same pages. Differences in page layout, responsive views or sampling should be explained before going further. The step is done when the team can explain the main differences and agrees the new tool is reliable for the reports they need.

  7. Switch the production tracking

    The web team removes the Hotjar snippet from production templates, deploys the new tracker to all sites in scope and confirms that the expected pages report data after release. The owner records the cutover date and keeps the Hotjar export and the overlap comparison in the project archive. The step is done when production shows only the new tracker and the archive is complete.

What drives the cost of self-hosting heatmaps

Self-hosting heatmaps replaces a subscription with infrastructure, configuration and ongoing operation that your team or a partner carries. The cards below separate the parts of that bill, mark which figures come from published vendor guidance, and show where a written quote has to fill the gaps.

Server and storage

Heatmap and replay data grows with traffic and retention, so the server is the first line of cost. PostHog's self-host documentation offers a free Docker Compose hobby deployment and recommends a server equivalent to 4 vCPU, 16 GB of RAM and more than 30 GB of storage. OpenReplay's README says a single VM with 2 vCPUs, 8 GB of RAM and 50 GB of storage is enough to start. Check whether these sizes hold for your page volume, and ask who pays for the cloud account, storage growth and backups.

PostHog self-host docs

Implementation and masking work

Before recordings go live, someone must configure capture-time masking, CSS selector rules and input redaction, then test them on forms that hold personal data. This is one-time work, but it is often the largest effort in the project. OpenReplay describes a private mode that masks all text and inputs by default. Ask any implementation partner to state in writing which pages, forms and selectors are in scope, and who signs off the masking rules.

Matomo plugin per-user license

Matomo's core is free under GPLv3, but its Heatmap and Session Recording plugin is a paid premium plugin sold per number of users under the InnoCraft EULA, with a 30-day free trial. That license is a recurring cost that scales with the number of people who log in to Matomo, not with page views. Confirm the current price and user count rules with the vendor before you size the budget, and check whether reviewers and analysts all need seats.

Free trial
30 days
Matomo plugin listing

Matomo hosting and database load

A Matomo host needs enough capacity for the pageview volume you expect. Matomo's requirements FAQ sizes a single server with at least 4 CPUs, 8 GB of RAM and 250 GB of SSD for up to 1 million pageviews a month, and recommends separate app and database servers with 8 CPUs and 16 GB of RAM each for up to 10 million pageviews a month. Recordings and heatmap data add load on top of ordinary analytics, so ask for a load test before you commit to a size.

Matomo requirements FAQ

Support and upgrades

Self-hosted open-source software has no vendor support contract by default. PostHog states that self-hosted deployments are officially unsupported and that it does not offer customer support for self-hosted instances. OpenReplay's community edition is supported by the community, while its Enterprise edition adds a custom SLA and dedicated support at custom pricing. Decide who patches the servers, applies upgrades and answers incidents, and ask a partner to quote that as a recurring retainer.

Retention you set

Retention drives storage cost more than any other setting. On a self-hosted tool you choose how long recordings and heatmap data are kept, and you own the deletion job. Shorter retention lowers disk and backup costs and reduces the personal data you hold, but it may limit trend analysis. Set a retention period with your privacy team, document it, and test that deletion actually runs. Budget the storage for the retention you choose, not for an assumed default.

Common questions before replacing Hotjar heatmaps

Are heatmaps free to self-host?

The software license is free for the core products, but the feature you pay for depends on the platform. The Matomo Heatmap and Session Recording plugin is a premium plugin sold per number of users under the InnoCraft EULA, with a 30-day free trial, so it is not covered by Matomo's GPL. PostHog's core repository is MIT licensed, but premium features in the ee directory need a PostHog license on a self-hosted instance. OpenReplay's heatmaps sit in product analytics under AGPLv3, while its ee directory is commercially licensed. Still, free licenses do not make the deployment free: you pay for the server, storage, the people who run it, and any engineering time to install the tracker and set masking. Confirm each feature's license in its ee or plugin terms before you commit.

What drives the cost of self-hosting heatmaps?

The main cost drivers are hosting, storage, and labor. Hosting depends on traffic and how much replay data you keep: PostHog's self-host docs recommend a server equivalent to 4 vCPU, 16 GB of RAM and more than 30 GB of storage, OpenReplay's README says a single VM with 2 vCPUs, 8 GB of RAM and 50 GB of storage is enough to start, and Matomo's requirements FAQ sizes a single server with 4 CPUs, 8 GB of RAM and 250 GB of SSD for up to 1 million pageviews a month. Recurring costs include servers, backups, upgrades and any Matomo plugin seats. One-time costs include setup, masking configuration and rebuilding heatmap views. Ask any implementation partner for a quote that separates these components and states which license fees are included.

How long does a migration off Hotjar heatmaps take?

The duration depends on how many pages, heatmap views and replay rules you need to rebuild, and on whether you run the old and new tools in parallel. Historical Hotjar heatmaps and recordings generally do not move into a new tool, so the work is mostly rebuilding the views you still use and redeploying the tracking code. A small site with a few key pages is a short project, while a large property with many templates, consent flows and masking rules takes longer. No fixed duration is supplied for this work, so ask any provider for a timeline in the written scope, and plan for an overlap period so you keep baseline data.

Can an internal team replace Hotjar heatmaps without outside help?

Yes, a team with server administration and front-end skills can do it, but it is a real operational commitment rather than a one-off install. The team needs to install and patch the platform, add the tracker to each page template, configure masking so sensitive fields are never captured, back up the database, and watch storage growth. Confirm that your engineers can own upgrades: PostHog states that self-hosted deployments are officially unsupported and that it does not offer customer support for self-hosted instances, so support comes from your team or a provider you hire. Community forums and the project documentation are the main support channels for the free editions.

What does the engagement need from our team?

A good engagement needs a named owner on your side, access to the servers or cloud account where the platform will run, and the people who know your consent and privacy rules. Expect to provide a list of pages and events to track, the heatmap views your marketing and product teams actually use, and the fields that must be masked. Your security team should review the hosting location, access controls, single sign-on and audit logging. Engagements are normally fixed scope, so agree on deliverables, acceptance tests and who signs off before work starts.

Is masking enough to keep heatmaps compliant with consent rules?

No, masking alone does not decide the consent question. CNIL's analytics guidance says most large audience measurement offerings fall outside the consent exemption regardless of configuration, and CNIL lists conditions for analytics trackers to be exempt, including limiting purposes to audience measurement and A/B testing. Matomo's ePrivacy FAQ states that adding heatmaps or session recordings removes the exemption in the CNIL framework. That means heatmaps usually require consent in France, and other EU authorities may take a similar view. Masking reduces the personal data you collect, but you still need a lawful basis, a consent banner where required, and a legal review of your setup. Ask your counsel to confirm the position for each country where you operate.

When is PostHog Cloud or OpenReplay Dedicated a better fit than self-hosting?

A managed option fits when you want the vendor to run upgrades and hosting and you accept a recurring subscription. PostHog's README recommends moving to PostHog Cloud above approximately 100k events per month for open-source deployments, and PostHog Cloud offers US (Virginia) and EU (Frankfurt) regions with a free tier of 1 million analytics events per month. OpenReplay Dedicated is a fully managed instance starting at $199 per month on AWS, GCP or Azure with a 7-day trial. Choose self-hosting when data must stay in your own infrastructure, when you need full control of retention, or when your team can run the platform reliably. Choose a managed option when operational capacity is the real constraint.

Where open-source heatmaps fall short of Hotjar

The main gap is support. Self-hosted PostHog has no vendor support: PostHog's self-host documentation states that self-hosted deployments are officially unsupported and that it does not answer product, infrastructure or other questions on self-hosted instances. Hotjar customers have a vendor to call, so a self-hosted PostHog heatmap setup needs an internal or contracted owner for upgrades, database tuning, backups and incident response. Confirm with your platform team who holds that role before you commit. Also check the licensing boundary: PostHog's repository is MIT licensed except the ee directory, and its README says premium features from that directory need a PostHog license on a self-hosted instance. Confirm which features you need sit outside ee, or review the posthog-foss repository's scope against your requirements.

OpenReplay's heatmaps sit inside its product analytics, but several controls you may expect are not in the open-source edition. SSO and SAML, SCIM provisioning, roles and permissions, and audit trail are listed on its pricing page as Enterprise edition features, and its README places the Enterprise Edition under a commercial license in the ee directory. Ask OpenReplay which of these you need, whether they are available for self-hosting under your contract, and how the AGPLv3 and MIT parts of the codebase affect any modifications your team makes. Matomo takes a different route: its Heatmap and Session Recording plugin is a paid premium plugin under the InnoCraft EULA, sold per number of users. Before you deploy it, your privacy team should review consent, because Matomo's ePrivacy FAQ notes that adding heatmaps or session recordings removes the CNIL consent exemption. Finally, no open-source option in this comparison reproduces Hotjar's on-site surveys. That gap is covered on the sibling surveys page, so plan a separate tool or a retained survey workflow for feedback widgets.

How DeployOpen replaces Hotjar heatmaps

DeployOpen is a Chainscore Labs company that plans, implements, customizes, hardens, backs up, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Hotjar heatmaps, that means choosing between self-hosted PostHog or OpenReplay and Matomo with its paid Heatmap and Session Recording plugin, then building the masking, consent and hosting controls your privacy and security teams need to review.

How we scope

  • Written scope agreed before work starts, listing which heatmap pages, consent settings and masking rules are in or out
  • Inventory of current Hotjar heatmaps, pages tracked and traffic volumes, so sizing reflects your real usage
  • Decision record comparing PostHog, OpenReplay and Matomo on licensing, masking and consent impact for your sites
  • Confirmation with your legal and privacy team of the CNIL-style consent position for each tracker before build

How we build

  • Deployment of the chosen platform in your infrastructure, with SSO, access control and audit logging configured
  • Capture-time masking and input redaction rules set and tested on each page that handles personal data
  • Tracking snippet installed from your own domain, with heatmap collection validated against the pages in scope
  • Security testing of the deployment, including admin settings, data exposure and credential handling before go-live

How we hand over

  • Written documentation of architecture, masking configuration, retention settings and the consent rationale for each site
  • Evidence pack covering access controls, logging and data handling so your compliance team can review the setup
  • Backup and restore procedure tested against the deployed platform, with the steps your operators will run
  • Side-by-side run plan with Hotjar during an overlap period, agreed in the written scope

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover
  • Version upgrades planned and tested in a staging copy before they reach production heatmaps
  • Re-testing of masking rules and consent settings whenever pages, forms or tracking changes
  • Confirm with the vendor which support, licensing and edition terms apply to your chosen platform before signing

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.