Microsoft Clarity vs PostHog

Microsoft Clarity is free and hosted, while self-hosted PostHog ties recordings to funnels, flags and experiments on infrastructure you run. The right choice depends on whether you need product analytics and data control more than zero-cost heatmaps.

On this page

Microsoft Clarity vs PostHog: when each one fits

Clarity fits when recordings and heatmaps are the whole job, the traffic is modest, and the data can sit with Microsoft under its terms. PostHog fits when the same sessions must sit next to funnels, feature flags and experiments, and when your organization needs the data on infrastructure it controls. The decision turns on three questions: whether you need product analytics and experimentation in one place, who must hold the event and recording data, and whether your team can run and upgrade a self-hosted stack without vendor help. PostHog's self-hosted route is officially unsupported, and the vendor does not offer customer support for product, infrastructure or other questions on self-hosted instances, so the operating burden is the deciding factor.

Start with the feature list. Clarity is a free session recording and heatmap tool, so its value is simple to test: install the tag, review recordings, and judge whether the replays answer your questions. PostHog's README groups its products into product analytics, session replay, error tracking, feature flags, experiments, surveys and data pipelines, so a team that already wants to move from a replay to a funnel, a flag rollout or an experiment result gains most from keeping everything in one data model. Confirm which of those capabilities your team will use in the first year, because the self-hosted edition's premium features sit in the ee directory and need a PostHog license, while the posthog-foss repository removes all proprietary code and features.

The self-hosted cost question is about people, not licenses. PostHog's self-host documentation offers a free Docker Compose (hobby) deployment under the MIT license, installed with a deploy-hobby script, and recommends a server equivalent to 4 vCPU, 16 GB of RAM and more than 30 GB of storage. The README says open-source deployments should scale to approximately 100k events per month and recommends PostHog Cloud above that, and new Kubernetes deployments of its paid self-hosted product are no longer supported. Before choosing, ask your platform team to estimate monthly event volume, retention needs and the upgrade cadence they can staff, and compare that with Clarity's free hosted service and its 30-day recording retention.

Which scenario favors which option

This table matches common buyer situations for Microsoft Clarity and self-hosted PostHog to the condition that makes each option the better fit. Read each row against your own traffic, team and residency needs, then check the conditions that would change the answer.

ScenarioBetter fitWhy it matters in this case
Heatmaps and recordings only for a marketing siteMicrosoft ClarityClarity is free and hosted, so there is no server to run. This holds as long as 30-day recording retention and the lack of product analytics meet your needs, and the consent signal rules for EEA, UK and Swiss visitors are handled.
Product team running funnels, flags and experimentsSelf-hosted PostHogPostHog combines recordings with funnels, feature flags and experiments in one data model. This matters when recordings must be tied to specific user events and rollouts, and when your team can operate the stack.
EU team with strict data residencySelf-hosted PostHogSelf-hosting keeps events and recordings in infrastructure you choose, instead of a vendor region. Confirm your hosting location, backup location and admin access, since Clarity runs on Azure under Microsoft's terms.
Small app with low event volumeEither, leaning PostHog if you need product dataPostHog's README says open-source deployments should scale to approximately 100k events per month. Below that level, a single-server deployment is workable, but you still carry upkeep that Clarity does not require.
Traffic above roughly 100k events per monthPostHog Cloud or a dedicated self-hosted sizing reviewPostHog's README recommends migrating to PostHog Cloud above that level. Self-hosting at higher volume requires a sizing exercise, so ask for a written capacity plan before committing.
Enterprise needing vendor supportNeither on self-hosting alone, or PostHog Cloud with paid platform packagesPostHog states that self-hosted deployments are officially unsupported. Confirm whether an external partner will support your instance, and check SSO and audit log availability, which PostHog sells as platform packages.
Need to keep recordings beyond 30 daysSelf-hosted PostHogClarity recordings expire after 30 days unless favorited. A self-hosted instance lets you set your own retention, subject to the storage you provision and your policy for personal data.
Enterprise that must avoid an unpaid license for premium featuresSelf-hosted PostHog on the free code path, or a review of the ee directoryThe PostHog README says premium features in the ee directory need a PostHog license on self-hosted instances. Confirm which features you need and whether the posthog-foss repository covers them.

What Clarity gives you for free and where its limits sit

Microsoft Clarity gives teams session recordings and heatmaps with no license fee and no servers to run. Microsoft hosts the service on Azure, so there is no database to size, no upgrade cycle to plan and no on-call rota for the analytics stack. A single tracking snippet is usually enough to start collecting, which makes Clarity a sensible baseline for many teams. Before comparing it with a self-hosted option, confirm the current terms of use and the data handling terms in writing, because those define what you are relying on at no cost.

The limits matter most when you need history or control over it. Recordings expire after 30 days unless you favorite them, so a team that wants a year of behavior for a quarterly product review has to act inside that window. The Data Export API covers dashboard metrics for only the last 1 to 3 days, with a call limit of 10 per day and 1,000 rows per response, so pulling a long history out of Clarity is slow and incomplete. Before any switch, list the recordings and dashboards you need to keep, favorite the sessions that matter and record the export limits you hit, so the decision rests on what you can actually take with you.

Consent is the constraint most likely to change the numbers. Since October 31, 2025, Clarity needs a valid consent signal from EEA, UK and Swiss visitors or it limits collection for them. Ask your consent management platform team how the Clarity signal is passed today, and estimate what share of your traffic falls in those regions, so you can see the likely drop in recordings. If you choose a self-hosted option, the same review should cover where the data is stored, who can view recordings and how masking is applied at capture.

What PostHog adds beyond recordings and heatmaps

Clarity shows what visitors did on a page. PostHog places those recordings next to funnels, flags, experiments, surveys, pipelines and error data in one product, which matters when product and engineering teams need to act on the same evidence. Each capability below has a self-hosting condition that changes the decision.

Product analytics

Funnels, trends, retention and paths built from the events your application sends. This matters when product managers need to see where users drop off and then open the sessions behind that drop-off. Check which event schema you will keep, because Clarity has no equivalent event model to carry over. Only the MIT-licensed core is free to run, so confirm which analytics features you need sit outside the ee directory before you commit to a self-hosted build.

PostHog license

Session replay

Recordings tied to the events and user identifiers that PostHog collects, so a support ticket or funnel step can open the matching session. Clarity recordings expire after 30 days unless favorited, while PostHog retention depends on your own storage and retention settings. Confirm masking rules are applied at capture time, since replay data stored on your servers is now your responsibility under your own privacy review.

Feature flags and experiments

Flags control which users see a change, and experiments measure whether that change moved a metric. This matters for teams that today ship UI changes without a controlled rollout. Clarity has no flag or experiment layer, so this is a new component to operate. Confirm which experiment and flag features your chosen edition includes, because self-hosted premium features from the ee directory need a PostHog license.

Surveys

In-app surveys that attach responses to the user and session context already captured. This matters when a team wants to ask why a user abandoned a flow, not only observe the abandonment. Surveys add another data collection point, so update your privacy notice and consent handling before launch. Check whether survey features are available in the edition you plan to run, since that depends on the ee boundary described in the license.

Data pipelines

Pipelines that route PostHog events to warehouses and other destinations, and import historical events from other tools. This matters when analytics data must leave the analytics tool for finance or BI work. Managed imports from Mixpanel and Amplitude cover at most one year per job and do not deduplicate events, so plan a test import first. Self-hosted instances do not get PostHog-run support for pipeline issues.

Managed migrations docs

Error tracking

Error and exception capture linked to the session replay that preceded the error. This matters for engineering teams who debug front-end failures using the same recording a product manager is reviewing. Clarity offers developer-oriented debugging, so compare the two on the errors your team actually triages. Operating error tracking adds event volume and storage on your servers, which should be included in the sizing you plan against the documented baseline.

Capabilities, hosting and licensing compared side by side

This table compares Microsoft Clarity with self-hosted PostHog on capabilities, hosting, licensing and support. Read the capability rows as items to confirm in Clarity's own documentation, since only PostHog's feature set is documented in our sources. The main takeaway is that Clarity is a free hosted replay and heatmap service, while PostHog gives you product analytics beside replay but shifts hosting, sizing and support onto your team.

DimensionMicrosoft ClaritySelf-hosted PostHog
Session recordingsOffered as a core feature; confirm current retention and consent behavior in Clarity's documentationIncluded under the session replay product; you store and govern recordings on your own infrastructure
HeatmapsOffered as a core feature; confirm which heatmap types and page scopes are availableNot listed as a headline item in PostHog's README; confirm current heatmap support in PostHog's documentation
Funnels, feature flags and experimentsConfirm in Clarity's documentation; not a core Clarity capability as supplied hereIncluded: product analytics, feature flags and experiments are listed among PostHog's products
Surveys and data pipelinesConfirm in Clarity's documentationIncluded: surveys and data pipelines are listed among PostHog's products
HostingHosted by Microsoft on Azure; you do not run serversRuns in your own infrastructure; you choose the server, storage and network location
LicenseFree hosted service; the code is not yours to runMIT outside the ee directory; premium ee features on self-hosted instances need a paid PostHog license
SupportCovered by Microsoft's service terms; confirm the support tiers that apply to youSelf-hosted deployments are officially unsupported; PostHog offers no customer support for product or infrastructure questions
Scale guidanceConfirm volume limits in Clarity's documentationOpen-source deployments should scale to about 100k events per month, per the README; PostHog recommends Cloud above that

Who holds the recordings and what the compliance review looks like

The first question is where the recordings live and who can reach them. Clarity is hosted on Microsoft's Azure infrastructure, and the data is handled under Microsoft's terms, so your team does not choose the region, the storage layout or the operator. Self-hosted PostHog reverses that arrangement: events, session recordings and the database behind them stay in your cloud account, data center or air-gapped network, and your compliance team decides where they sit. Confirm with your legal team which data processing terms apply to Clarity for your visitors, and confirm with your security team which network zone the PostHog instance would run in before comparing the two.

The second question is identity and logging. On PostHog Cloud, SSO, audit logs, custom roles and project permissions are sold as platform packages, and the Cloud hosting choice is limited to the US (Virginia) or EU (Frankfurt) regions. On a self-hosted instance, you must plan those controls yourself: how staff authenticate, who can view recordings, how admin actions are logged, and how access is removed when someone leaves. Ask your team to write down the access model for recordings (who can watch, export or share them) and to confirm how the chosen platform's logs will be retained and reviewed. Confirm in the PostHog documentation which of these controls are included in the self-hosted edition you plan to run, since the paid features are gated by license.

Before choosing, confirm two things with your legal and security teams: the consent handling and the masking configuration. Clarity's consent behavior for EEA, UK and Swiss visitors is covered separately, but for either tool the reader should verify which consent signal gates recording, which elements are masked at capture time, and whether masked fields such as form inputs and account numbers are excluded before any data leaves the browser. Document the answers, the people who approved them and the retention period you set. Those records are the evidence a compliance reviewer will ask for, and they are easier to produce during the selection than after a review has started.

Which PostHog edition you would actually run

The hobby deployment is PostHog's free self-hosted option, installed with a deploy-hobby script on a Docker Compose stack. The code sits under the MIT Expat license in the main repository, so you pay no license fee, but PostHog states that self-hosted deployments are officially unsupported and that it does not offer customer support for product, infrastructure or other questions on self-hosted instances. Your team owns patching, backups, upgrades and incident response.

  • Licensing: MIT for the code outside the ee directory, so the hobby stack carries no license fee.
  • Support position: unsupported by PostHog. Vendor help is limited to public documentation and community channels.
  • Sizing guidance: a server equivalent to 4 vCPU, 16 GB of RAM and more than 30 GB of storage, per PostHog's self-host documentation.
  • Kubernetes: not the route here. Confirm the current Kubernetes position for any new deployment in PostHog's self-host documentation.
  • Scale ceiling: the README says open-source deployments should scale to approximately 100k events per month, above which it recommends PostHog Cloud.

This edition fits a small internal pilot or a single product where your team accepts unsupported operation. Confirm that the hobby stack includes every feature you need, since premium features in the ee directory are a separate matter.

What a self-hosted PostHog stack costs beyond the license

Clarity carries no license fee, so the comparison turns on what you pay to run PostHog yourself. The cards below separate recurring infrastructure and staff time from one-time setup, and flag the points where the cost of self-hosting changes direction, including the license tier and the move to PostHog Cloud.

Server and storage hosting

PostHog's self-host documentation recommends a server equivalent to 4 vCPU, 16 GB of RAM and more than 30 GB of storage for its Docker Compose hobby deployment. Storage grows with event volume and your retention window, so the bill rises with traffic and with how long you keep recordings. Ask your cloud or data center team to price the server, backups and egress in your own environment, since Clarity's free service has no equivalent line item.

Self-host docs

Staff time for upkeep

Your own engineers handle installation, upgrades, backups, monitoring and incident response. PostHog states that self-hosted deployments are officially unsupported and that it offers no customer support for product, infrastructure or other questions on self-hosted instances. Recurring effort comes from on-call coverage and version upgrades, so ask who owns each task and how many hours per month your team can commit before you choose this path.

One-time setup and instrumentation

Initial work includes deploying the stack, installing the tracking snippet or SDK on each property, mapping events and identifiers, and wiring your consent manager so recordings respect the choices visitors make in the EEA, UK and Switzerland. This cost is paid once but recurs when you add products or change pages. Scope it in writing, listing each site, app and consent integration, before you compare totals.

Paid license for premium features

The core PostHog code is MIT licensed, but the ee directory needs a PostHog license for premium features on a self-hosted instance. Teams that need only the core analytics, recordings and flags can avoid this fee by using the posthog-foss repository, which removes proprietary code and features. Confirm which features you need, such as SSO, audit logs or custom roles, before assuming the license is optional.

PostHog license

Cloud as the cost alternative

PostHog says open-source deployments should scale to approximately 100k events per month and recommends moving to PostHog Cloud above that. Its pricing page lists a first 1 million analytics events free each month on the Free plan. Above your volume, compare the Cloud usage bill, the EU (Frankfurt) hosting region and the platform packages against your self-hosted server, staff and license costs, and ask PostHog for a quote on your actual event counts.

PostHog pricing

Clarity's zero fee and hidden effort

Clarity has no license fee, but it is not zero cost. You still need a consent manager to send valid signals for EEA, UK and Swiss visitors, and exporting data from Clarity requires its Data Export API, with recordings expiring after 30 days unless favorited. Budget the effort for consent tooling and export, and for any history you want to keep, so the comparison reflects the full cost of each option.

How events and recordings move in each setup

The diagram starts in the visitor's browser, where the consent manager decides whether the Clarity tag or the PostHog SDK may run at all. Clarity's data leaves the browser for Microsoft's hosted service, outside your control. The PostHog path runs in parallel: the SDK sends events through your reverse proxy to a self-hosted PostHog inside your trust boundary, with masking applied before anything is sent. Check where the consent gate sits relative to each tag, and confirm that masking runs in the browser, not on the server.

Clarity sends data to Microsoft; the PostHog path stays inside your boundary.

What a move from Clarity to PostHog involves

The sequence moves tracking, consent and session recording from Clarity to a PostHog instance you run, and keeps a short parallel period so you can confirm the data matches before the Clarity tag is removed. It also sets expectations about which Clarity history can and cannot come with you.

  1. Inventory Clarity tags and recording needs

    List every site, app and template that loads the Clarity tag, along with the pages, funnels and heatmaps your teams actually use. Note which consent manager triggers the tag for EEA, UK and Swiss visitors. Owners are usually the web or product analytics lead with the privacy team. The step is done when each property has a named owner and a written list of the views that must be recreated.

  2. Decide which history to keep and export

    Decide which recordings, dashboard metrics and reports must survive the switch. Clarity's Data Export API covers dashboard metrics for a short recent window and recordings expire after 30 days unless favorited, so most teams should assume recordings will not carry over. PostHog's managed migrations import historical events from Mixpanel and Amplitude, not Clarity, so confirm with PostHog whether any Clarity history can be brought in. The output is a signed-off list of exports and an accepted gap for everything else.

  3. Deploy self-hosted PostHog in your infrastructure

    Install PostHog in your own cloud account or data center, choosing between the free Docker Compose hobby deployment and a paid self-hosted product, and size the server against PostHog's self-host guidance. Ask PostHog whether your required features sit in the MIT-licensed code or the ee directory, since premium features need a PostHog license. Because PostHog does not provide customer support for self-hosted instances, assign internal or partner ownership for upgrades and backups. The step closes when the instance answers health checks and stores test events.

  4. Wire the SDK and consent manager

    Add the PostHog JavaScript snippet to each property in place of the Clarity tag, and connect it to your consent manager so that tracking and recording start only after the right consent signal. Replace the Clarity consent trigger with the equivalent PostHog switch, and check that the legal basis you rely on matches your data protection advice. The output is a test page where consent accepted, consent refused and consent withdrawn each produce the expected network behavior.

  5. Configure masking and session recording

    Set session recording to mask text and inputs by default, block sensitive pages and disable recording on forms that collect personal or financial data. Confirm that masking is applied in the browser before data leaves the device, and review the recording settings with your security or compliance team. The step is done when a test session on a sensitive form shows no readable personal data in the replay.

  6. Recreate heatmap analysis, funnels and dashboards

    PostHog does not offer a one-to-one copy of Clarity heatmaps, so rebuild the questions they answered using PostHog's session replay, funnels, paths and event-based insights, and document any gap that remains. Recreate the dashboards from the inventory in step one and assign owners who will review them. The output is a dashboard set that the analytics owner has compared against the Clarity views on the same pages.

  7. Run parallel tracking before retiring Clarity

    Keep the Clarity tag and the PostHog snippet running side by side for a period agreed in your written plan, comparing page views, session counts and recording coverage. Investigate differences caused by consent, ad blockers or masking rules before you accept them. When the numbers agree within the tolerance your team sets, remove the Clarity tag from the templates, the tag manager and the consent configuration. The step closes with a change record and an updated data inventory.

What buyers and engineers ask before switching

What does a self-hosted PostHog switch cost, and who gets paid for each part?

The software itself has no license fee on the free path, since the core PostHog repository is MIT licensed and the hobby Docker Compose deployment is free. The costs sit in the components around it: server infrastructure in your own cloud account or data center, storage, backups, monitoring, the implementation work by an internal team or an outside firm, and ongoing upkeep. Infrastructure is recurring, while setup, SDK changes, consent wiring and masking review are largely one-time. Ask any provider for a quote that separates implementation, infrastructure and retainer support so you can see which items recur. Note that PostHog's paid self-hosted features in the ee directory require a PostHog license, which is a separate cost to confirm before you start.

How long does a PostHog migration from Clarity take?

No researched duration is available for this switch, so ask for a timeline in a written scope rather than relying on a general estimate. The main drivers are the number of sites and apps you run, how much consent logic you need to rebuild for EEA, UK and Swiss visitors, and how long your privacy and security reviewers take to approve masking rules for recordings. Parallel running, where Clarity and PostHog both collect for a period, adds time but lowers the risk of a gap in coverage. A fixed-scope agreement should list each site, the consent flow, the masking review and the acceptance criteria before work starts.

What does your team need to provide for a self-hosted PostHog deployment?

You need infrastructure access in the environment where PostHog will run, including a server or cluster that meets PostHog's documented minimum, network and DNS control, and a backup target. A privacy owner must confirm which events and properties may be captured, approve masking rules and sign off the retention period. A developer must update the tracking snippets or SDK calls in each site and app, and someone must own the consent manager integration. Plan for these roles before scoping, because gaps in any one of them are the most common reason work stalls.

Can our engineers run self-hosted PostHog without vendor support?

Yes, if your team has the skills to operate it, but you should know that PostHog's self-host documentation states that self-hosted deployments are officially unsupported and that PostHog does not offer customer support for product, infrastructure or other questions on self-hosted instances. That means upgrades, database maintenance, scaling, incident response and security patching fall to your team or to a service provider you hire. PostHog's README also says open-source deployments should scale to approximately 100k events per month and recommends migrating to PostHog Cloud above that, so confirm your expected volume early. DeployOpen plans, implements, hardens, backs up, upgrades and supports self-hosted platforms in your infrastructure under a written scope or retainer, which can cover part or all of that load.

Is PostHog's free Cloud plan a substitute for self-hosting?

It can be, if the main concern is cost and you do not need data to stay on your own servers. PostHog's pricing page says the first 1 million analytics events are free each month, and the Free plan includes 1 project and 1-year data retention. The pricing page also lists two Cloud hosting regions, US (Virginia) and EU (Frankfurt), so check whether that location satisfies your residency and transfer requirements. SSO, audit logs, custom roles and project permissions are sold as platform packages, so confirm those controls are included before you rely on the hosted plan. If your requirement is that recordings and events never leave your infrastructure, the hosted plan does not meet it.

Does our Clarity history survive a move to PostHog?

Usually not in full, so plan on keeping what matters outside Clarity before you switch. Clarity's Data Export API covers only a short window of dashboard metrics, and recordings expire after 30 days unless they are favorited, so most session history is gone by the time a switch happens. Export what you need while the account is still active, including any favorited recordings and the dashboard metrics you rely on for reporting, and store them in your own systems. PostHog's managed migrations import historical events from Mixpanel and Amplitude and document scripted paths from Google Analytics and Heap, but no researched source confirms an import path from Clarity, so confirm any historical import with PostHog before you assume it. Treat the forward-looking PostHog setup as the baseline and archive Clarity data separately.

What should a security or privacy reviewer check in a PostHog setup?

Start with the capture configuration, because it decides what personal data reaches your servers. Confirm masking for text inputs and sensitive pages in session replay, the retention period you set, which user identifiers are sent, and whether IP addresses are truncated. Review access controls, SSO and audit logging, which are sold as platform packages on the hosted plan, so check how your self-hosted instance provides them. Ask your consent manager to block capture for EEA, UK and Swiss visitors until a valid consent signal is recorded, and test that behavior in a staging environment before launch. Record these decisions so your compliance team can show how the system was configured.

How DeployOpen helps you decide, deploy and migrate

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, so the choice between Clarity and PostHog is made on your data, consent setup and team capacity. We start from a written scope and deliver the deployment, its controls and the evidence your reviewers will ask for.

How we scope

  • Confirm which Clarity features you use today, such as recordings, heatmaps and the consent signal, and which PostHog features you need alongside them.
  • Agree the target hosting environment, sizing and expected event volume in writing before any build work starts.
  • Define which PostHog components are in scope, and whether the work uses the MIT-licensed core or the ee directory with a PostHog license.

How we build

  • Deploy the chosen PostHog configuration in your cloud account, data center or air-gapped network, using the hobby or supported self-host path you select.
  • Configure masking, consent gating and data handling so recordings and events follow your privacy rules before collection begins.
  • Test the deployment, including recording capture, masking behavior and access controls, and fix findings before go-live.

How we hand over

  • Document the architecture, configuration keys, access model, backup approach and the steps to upgrade the instance.
  • Plan the migration of historical data, noting that PostHog's direct import jobs cover at most one year of data per job and are not deduplicated.
  • Deliver runbooks and evidence on controls so your compliance and security teams can review the platform independently.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, scoped in writing.
  • Retest the deployment after upgrades, configuration changes or consent manager updates to confirm masking and consent still hold.
  • Agree in the quote who maintains the servers, backups and upgrades, since PostHog does not provide customer support for self-hosted instances.

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.