How to migrate from Matomo to PostHog without losing trust in the numbers
PostHog's documented import paths cover Mixpanel, Amplitude, Google Analytics and Heap but not Matomo, so the usual move from Matomo is forward capture with a parallel run, plus a separate decision on whether old Matomo data stays in an archive. Treat these as two tracks with separate owners. The parallel run installs PostHog beside Matomo, sends the same pageviews and key events, and compares daily counts over a fixed window before any Matomo report is retired. The archive track decides whether Matomo stays online in read-only mode, whether its exports move into your data warehouse, or whether the business accepts a break in long-term trend lines. Settle the archive question before cutover, because the parallel run only produces comparable numbers going forward.
The short answer on effort depends on four things: tag count, consent obligations, the history the business must keep comparable, and any Matomo premium plugins in use. Tag count sets how much of the tracking plan gets rebuilt as PostHog events and properties. Matomo's ePrivacy FAQ says France's CNIL exempts some analytics from consent only when it is limited to anonymous performance measurement, and that adding User ID, heatmaps or session recordings removes the exemption. The FAQ names Italy, the Netherlands and Spain as authorities that exempt certain privacy-focused analytics when their criteria are met. A team that turns on PostHog session replay or user identification therefore needs a fresh consent review in each market it serves. Confirm the current criteria with privacy counsel before assuming the Matomo setup carries over.
History and plugins settle the rest. PostHog's managed migrations import historical events directly only from Mixpanel or Amplitude, using API credentials or JSONL files in an S3 bucket, and each direct import job covers at most one year of data without deduplication. Matomo is not on that list, so any historical load is a custom export and transform project to scope separately. Check whether the team uses Matomo's Heatmap and Session Recording plugin, a paid premium plugin sold per number of users under the InnoCraft EULA, which is a separate license from the GPL. If you retire that plugin, its fee stops at cutover, but PostHog session replay then brings the consent review above. Ask for a written inventory of tags, plugins, consent settings and history requirements before accepting any quote.
What maps cleanly from Matomo to PostHog and what does not
This table sets out which Matomo capabilities have a direct PostHog counterpart, which need a rebuild, and which have no Matomo source to migrate. Read the migration notes before planning cutover, because the data behind historical reports is often not portable. Rows marked for confirmation need a written answer from PostHog before you commit.
| Matomo capability | PostHog equivalent | Migration notes |
|---|---|---|
| Page and pageview tracking | Captured as the $pageview event | Map Matomo page URL and title fields to $pageview properties and test a sample before cutover. |
| Session recording and heatmaps (paid plugin) | Session replay inside the PostHog suite. Confirm heatmap coverage with PostHog. | Recordings do not transfer. Matomo's FAQ says heatmaps or recordings remove the CNIL consent exemption, so re-check consent. |
| Feature flags and surveys | Included in PostHog, with no Matomo source | Nothing to migrate. Build flags and surveys as new work after cutover. |
| Reports tied to stored raw visits | Rebuilt from events captured after cutover, unless history is imported | Imported Google Analytics data in Matomo is aggregated only, with no Visitor Log or Segmentation, so these reports rarely transfer one for one. |
| Segments (confirm with PostHog) | Confirm with PostHog how each Matomo segment maps to PostHog filters or cohorts | Confirm the mapping before cutover, then compare counts on the same date range. |
| Custom reports (confirm with PostHog) | Confirm with PostHog which custom reports can be rebuilt as insights or dashboards | Custom Reports do not run on imported Google Analytics data in Matomo, so plan a rebuild. |
| Goals and funnels (confirm with PostHog) | Confirm with PostHog how goals and funnels are recreated as funnel insights | Matomo's Google Analytics import does not bring over Funnels, so expect a manual rebuild and testing. |
| Historical data import (confirm with PostHog) | No documented Matomo route in PostHog's migration guides | Confirm an export path from Matomo. Historical imports need a paid analytics plan and cannot be selectively deleted. |
Which documented import paths apply, and which do not
PostHog documents import routes for Mixpanel, Amplitude, Google Analytics and Heap, and Matomo's own importer only moves data into Matomo. Each PostHog route starts from a source other than Matomo, so the historical data plan needs a separate check before cutover. The cards below separate the routes that do not apply from the question that decides whether any Matomo export can feed PostHog.
Managed migrations from Mixpanel or Amplitude
PostHog's managed migrations import historical events from Mixpanel or Amplitude using API credentials, or from JSONL files in an S3 bucket. Each direct import job covers at most one year of data, and events are not deduplicated, so overlapping jobs can double count. These connectors do not apply to a Matomo source. Before you run a backfill, check the date windows and decide how your team will remove duplicates.
Managed migrations docsGoogle Analytics GA4 migration route
PostHog documents a Google Analytics route that reads GA4 data from the BigQuery export, converts event names such as page_view to $pageview, and sends them with the Python SDK. The route exists because Google Analytics' own historical exports are limited. It does not apply to a Matomo source. Confirm that the BigQuery export was enabled and how far back it reaches before you scope any backfill.
Heap migration on Pro or Premier
PostHog's Heap guide exports data through Heap Connect to S3, Redshift, BigQuery or Snowflake, then converts it and sends it with the historical_migration flag. Heap Connect is only available on Heap's Pro or Premier plans. This route does not apply to a Matomo source. Ask Heap whether your plan includes Heap Connect before you schedule the work.
The historical_migration flag and plan access
Historical imports sent with the historical_migration flag carry no ingestion fees, according to PostHog's migration documentation. A paid product analytics plan is still required to access the import features. Imported event data cannot be selectively deleted, so load a small test window first. The flag affects cost and deletion risk for whichever source you use, so it does not replace a source export.
Matomo's Google Analytics Importer direction
Matomo's Google Analytics Importer is a free plugin for Matomo On-Premise under GPL v3 or later. It imports reports from a Google Analytics property into a new Matomo site, so it moves data into Matomo and offers no path out. Matomo's FAQ adds that the importer brings aggregated reports only, so the Visitor Log, Custom Reports and some reports such as Funnels do not come across. Treat it as an inbound tool only.
Importer plugin listingConfirm any Matomo export path
The routes documented for this page cover Mixpanel, Amplitude, Google Analytics and Heap, so none of them confirms a Matomo export as an input. Before you assume a Matomo export can feed PostHog's import path, ask Matomo which export formats it offers and ask PostHog whether its JSONL route or another import method accepts them. Get both answers in writing and test with a copy of one month of data before you plan cutover.
Both tags run behind one consent gate during the parallel run
This illustrative diagram shows the pattern of a parallel run, not a configuration. Traffic starts at the website or app, and each hit passes a consent gate before it reaches either the Matomo tag or the PostHog SDK. Matomo keeps its archive, which becomes read-only after cutover. PostHog receives events in the Cloud region you choose, US (Virginia) or EU (Frankfurt). At cutover, a decision node asks whether historical Matomo data is imported into PostHog or stays in the archive. Before any traffic flows, confirm that the consent gate covers both tags, and confirm the region choice with PostHog.
Illustrative pattern of a parallel run, with a consent gate and an import decision.
The migration sequence: inventory, pilot, parallel run, cutover and decommission
The sequence moves Matomo measurement to PostHog in an order that keeps each count checked before the old tag is removed, so the team ends with a signed record of what moved, what changed and what was retired.
Inventory sites, tags, goals and consent settings
List every Matomo site, tag, goal, custom dimension and premium plugin in use, including the Heatmap and Session Recording plugin if it is licensed. Record the consent banner configuration for each site, because adding User ID, heatmaps or session recordings can remove the consent exemption that some regulators recognize for limited analytics setups. Name who reads each report and what decisions it drives, since those people define what PostHog must reproduce. Confirm with PostHog whether any historical Matomo data is needed, because its documented managed import paths cover Mixpanel and Amplitude. The step is done when a signed inventory lists every item and its owner.
Pilot one low-risk site in PostHog
Choose one low-risk Matomo site, ideally one with limited regulatory exposure. Pick the PostHog Cloud region before any data flows, either US (Virginia) or EU (Frankfurt), and record the choice with the data processing terms your legal team reviews. Install the PostHog snippet or SDK on the pilot site, then map the inventoried goals to PostHog events and insights, marking anything without a direct equivalent. Decide which PostHog features are in scope now, since SSO, audit logs and custom roles are sold as platform packages. The pilot is done when the inventory items for that site are reproduced, the gaps are written down, and the report readers from step one have signed off on the dashboards.
Run both tags against an agreed tolerance
Run the Matomo and PostHog tags side by side for the period set in the written scope. The length depends on the inventory, so agree the timeline in writing before work starts. Before the run begins, agree a written tolerance for count differences that names the metrics it covers, the pages or segments checked, and who can accept a variance outside it. Expect differences from definitions, such as how each tool counts pageviews, filters bots or handles visitors who decline consent, and document each one with its cause. The step is done when every checked metric sits inside tolerance or has a recorded, signed explanation.
Cut over by removing the Matomo tag
Remove the Matomo tag from every template, tag manager container and server-side include listed in the inventory, then confirm removal on each page with a tag inspection. Freeze the Matomo archive so the historical reports stop changing, and export any reports the business still needs. Keep PostHog as the only live collector for each migrated site, and tell report readers where their dashboards now live. The step is done when a check of the inventoried pages shows no Matomo requests, the archive freeze is recorded, and the dashboard owners confirm the new data source.
Decommission after backup and retention sign-off
Take a final backup of the Matomo database and files before any shutdown, and store it where your retention policy requires. Record retention decisions for the archive, the backup and PostHog data. PostHog's pricing page lists 1-year data retention on the Free plan and 7-year retention on the Pay-as-you-go plan, so the plan choice is also a retention decision. Obtain written sign-off from the data owner, security and compliance leads before deleting anything. Then shut down the Matomo server, revoke its database and API credentials, and remove its DNS and monitoring entries. The step is done when the sign-off is filed, a test restore of the backup has succeeded, and no Matomo service is running.
What drives the cost and effort of moving off Matomo
This table lists the cost and effort drivers in a Matomo to PostHog move, who pays for each one, whether it is one-time or recurring and what to request in a quote. Matomo's On-Premise Community edition has no license fee, so most of the comparison comes down to who runs the infrastructure, which Cloud or self-host choice settles, and how much one-time work the tracking and history changes require. Use the recurring rows to compare running costs and the one-time rows to size the project.
| Cost driver | Who pays | One-time or recurring | What to ask for in a quote |
|---|---|---|---|
| Matomo license | No fee for On-Premise Community. Paid plugins, such as Heatmap and Session Recording, are billed by InnoCraft | Recurring only if paid plugins are in use | Plugin list, user counts and renewal terms, since that plugin is sold per number of users |
| Matomo servers, up to 10 million pageviews a month | Your organization. Matomo's requirements FAQ sizes one 4 CPU, 8 GB, 250 GB SSD server up to 1 million pageviews a month | Recurring | Current monthly pageviews, the sizing band they fall in and whether a split app and database setup is needed |
| PostHog Cloud usage | Your organization, billed by PostHog on usage. First 1 million analytics events each month are free (PostHog pricing page) | Recurring | Expected monthly event volume and which usage the quote meters, since charges follow usage |
| PostHog plan limits | Your organization. PostHog's pricing page lists Free at 1 project and 1-year retention, Pay-as-you-go at 6 projects and 7-year retention | Recurring | Projects needed per environment and the retention your compliance team requires, then the plan that covers both |
| SSO and audit logs | Your organization, through platform packages. PostHog's pricing page says SSO, audit logs, custom roles and permissions are sold this way | Recurring | Whether SSO and audit logs are in the quoted package, and what that package costs over the contract term |
| Self-host or Cloud | Cloud: PostHog runs infrastructure. Self-host: you run servers and staff. Hobby Docker Compose is officially unsupported | Recurring, with one-time setup for self-host | Who handles upgrades, backups and incidents in each option, and whether any ee features need a PostHog license |
| Consent review | Your organization, through counsel. Matomo's exemption depends on its configuration, so PostHog needs its own review | One-time, repeated when features change | Whether counsel is in scope, and a written view on which PostHog features need consent in each market you serve |
| Tag and event rework | Your engineers or an implementation partner, paid for time to replace Matomo tracking with PostHog SDK calls | One-time | Page and component inventory, tag manager containers in use, and the event name mapping |
| History decisions | Your team decides what history to keep. Historical imports need a paid product analytics plan | One-time | Whether the quote covers historical import and which time range, since imported events cannot be selectively deleted |
What usually goes wrong in a Matomo to PostHog move and how to prevent it
The risks in a Matomo to PostHog move cluster around legal basis, data retention, import behavior and self-hosting support. Each card names one risk, why it matters for this move and the check to run before cutover. Confirm every point against your own environment and the vendors' current terms.
Consent exemption may not carry over
Matomo's ePrivacy FAQ says the CNIL exemption for some audience measurement is removed when features such as User ID, heatmaps or session recordings are added. PostHog's session replay and identification raise the same question, so an exemption that applied to a Matomo setup does not carry over automatically. Test each replay or identify setting against your own legal basis with counsel before enabling it. Keep a written record of which settings were approved, and why.
Matomo ePrivacy FAQCounts diverge between tools
Matomo and PostHog should be compared on definitions before totals, so confirm how each tool defines a visit, a pageview and a custom event. Run both tools side by side for an agreed period and compare the same goals and pages each day. Agree the acceptable tolerance in writing before the run starts, and log every gap by cause. PostHog's managed migration documentation says events are not deduplicated, so re-running an import over an existing range can double count.
Managed migrations docsImported events cannot be removed
PostHog's migration documentation says there is no way to selectively delete event data once it is imported. A bad mapping, a wrong timestamp or a wrong project therefore stays in the analytics history. Run every import on a scratch project first, check event names, properties and time ranges against a sample of Matomo reports, and only then load the production project. Historical imports also require a paid product analytics plan, so confirm the plan before you start.
Migrate to PostHogRetention shorter than history
PostHog's pricing page sets a shorter retention window on the Free plan than on Pay-as-you-go. If your Matomo site holds more history than the plan you choose will keep, the older years will not be queryable in PostHog. Decide which history must stay live for reporting and audits, match it to a plan, and keep a read-only Matomo instance or an archive for anything older. Confirm with PostHog how retention applies to imported events before you commit.
- Free plan retention
- 1 year
- Pay-as-you-go retention
- 7 years
Self-hosting has no vendor support
PostHog's self-host documentation states that self-hosted deployments are officially unsupported and that PostHog offers no customer support for product or infrastructure questions on them. The README recommends moving open-source deployments to PostHog Cloud once event volume goes past that guide. If you choose self-hosting for data control, your team owns upgrades, backups, incident response and troubleshooting. Write that ownership into the plan, and confirm the hosting model against the event volume you expect after cutover.
- Events per month
- 100k
Unmapped Matomo reports go missing
Matomo segments, custom reports and saved views with no confirmed PostHog equivalent are easy to lose at cutover, because nobody wrote them down. Inventory them from Matomo's configuration and from the people who use them, and mark each as mapped, rebuilt or retired. For every mapped item, confirm the PostHog equivalent in your own environment, and check that it returns the same answer on a sample period before you switch off the Matomo report. Expect some items to have no equivalent at all, and decide in advance who signs off on dropping them.
Questions teams ask before moving from Matomo to PostHog
How much does it cost to move from Matomo to PostHog?
Matomo's pricing page lists On-Premise Community as free forever, and PostHog's free tier covers the first 1 million analytics events each month, so license fees on either side are unlikely to be the main cost. The money goes to people and hosting. Your team or a partner is paid for planning, tracking changes, consent review, dashboard rebuilds and testing, which are mostly one-time costs. Recurring costs are hosting, PostHog Cloud usage above the free tier, and any support or retainer you buy. Event volume, the number of sites and apps, and the number of reports to rebuild drive the total most. Ask for a quote built from a written scope that lists deliverables, exclusions and who owns each task, and ask PostHog for current usage rates before you budget.
How long does a Matomo to PostHog migration take?
Length depends on scope, and no single duration applies to every migration, so ask for milestones in the written scope before you set a launch date. The main drivers are how many sites, apps and events you track, how much of your tracking plan you rewrite, and how many dashboards and reports must match what Matomo produces today. Consent changes, legal review and server work add time, and self-hosting adds more if your team is new to running the stack. Historical data decisions can also extend the project. Running both tools side by side for a period is a common way to confirm that numbers agree before cutover, so plan that window explicitly. Ask the provider to name each milestone, the parallel-run period, and the acceptance test for each report before work begins.
Can our in-house team handle the Matomo to PostHog move?
Yes, a team with engineering and analytics skills can do it, but the work spans more than code. Plan for four skill areas: someone who can change the tracking code (the Matomo tag or JavaScript snippet and the PostHog SDK or tag setup), someone who owns consent configuration with legal, someone who owns the data model and event naming, and someone who owns reporting and can sign off that dashboards match. Matomo's own ePrivacy guidance shows why consent work needs legal input, since the answer depends on country and on which features you enable. In-house suits a team with spare capacity that can test before cutover. A partner fits when deadlines are fixed, when several sites or apps need changes at once, or when you want a written scope with deliverables and retesting.
Can historical Matomo data move into PostHog?
Confirm this with PostHog before you plan for it. PostHog's managed migrations documentation covers imports from Mixpanel and Amplitude using API credentials, or from JSONL files in an S3 bucket, and separate guides cover Google Analytics and Heap. A direct Matomo import is not among those documented paths, so do not assume one exists. Even on supported paths, each direct import job covers at most one year of data, events are not deduplicated, and historical imports need a paid product analytics plan to unlock the import features. Imported event data also cannot be selectively deleted. If old trends matter for audits or long-term reporting, keep the Matomo instance available read-only until you confirm an approach.
Should we self-host PostHog or use PostHog Cloud?
Start with PostHog Cloud unless you have a firm reason to self-host, because the free self-hosted option comes with limits. PostHog's Docker Compose hobby deployment is free under the MIT license, installed with a deploy-hobby script, and PostHog recommends a server equivalent to 4 vCPU, 16 GB of RAM and more than 30 GB of storage. PostHog states that self-hosted deployments are officially unsupported and that it does not offer customer support for product or infrastructure questions on them. Its README says open-source deployments should scale to about 100k events per month and recommends Cloud above that. Self-hosting also puts upgrades, backups and security patching on your team. Premium features in the ee directory require a PostHog license, and new Kubernetes deployments of the paid self-hosted product are no longer supported. If you must self-host, get upgrades, backups and support scoped in writing first.
Which PostHog Cloud region should we pick, US or EU?
Choose the region your legal and data protection team approves, because PostHog Cloud offers US (Virginia) and EU (Frankfurt). If your analytics are on Matomo Cloud today, note that Matomo stores that data in Frankfurt, Germany, so EU (Frankfurt) keeps storage in the same country. That alone does not settle your compliance position, since transfers, contracts and privacy notices still apply. Ask PostHog whether a region can be changed after launch and what that involves before you commit. Check also that SSO, audit logs and custom roles are covered by the plan you choose, since PostHog sells those as platform packages. Current region and plan details are on PostHog's pricing page.
What must our team provide before a Matomo migration starts?
Your team must name owners, grant access and get legal sign-off on consent before work starts. Name one business owner who approves reporting goals, one technical owner for tag and application code, one data owner for event names and retention, and one reporting owner who signs off that dashboards match. The implementation needs admin access to the tag manager, the Matomo instance or Matomo Cloud account, the web and application code repositories, and the server if you self-host. Legal must approve the consent approach, including any exemption you rely on. Matomo's ePrivacy FAQ notes that features such as User ID, heatmaps or session recordings can remove the French CNIL exemption it describes, so list every feature you track before that review. Agree on one decision maker so scope changes are approved in writing.
What breaks when we move event tracking from Matomo to PostHog?
Event names, goals, segments and custom dimensions break first, so map each one before you touch code. PostHog's own Google Analytics migration guide shows the kind of renaming involved, such as converting page_view to $pageview before sending events. Matomo reports such as the Visitor Log, custom reports and segments have no equivalent that this page can confirm, so list each one and ask PostHog or your partner how it will be rebuilt. Keep both tools running in parallel until counts agree for key pages, goals and campaigns. Dashboards and alerts that point at Matomo will stop updating at cutover, so inventory every consumer, including scheduled email reports, exports and BI connections. Agree on what success means for each report before cutover.
How DeployOpen scopes, runs and supports a Matomo to PostHog migration
DeployOpen is a Chainscore Labs company that plans, implements, integrates, backs up, upgrades, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For a Matomo to PostHog move, that means agreeing the scope in writing before work starts, building the data and tracking changes in your environment, and handing over documentation and the evidence compliance reviewers ask for. Most engagements are fixed-scope, and ongoing support is available as a retainer.
How we scope
- The written scope lists which Matomo sites, goals, reports and tracking code move to PostHog.
- The scope should name the PostHog product areas in use, such as product analytics, session replay, feature flags or surveys.
- Paid Matomo plugins, such as Heatmap and Session Recording, get their own line for what replaces them.
How we build
- Event mapping from Matomo actions and goals to PostHog events is documented and tested against sample data before cutover.
- Historical data is imported through a path confirmed in writing, since PostHog's managed migrations list Mixpanel and Amplitude as sources.
- Each import job, direct or custom, is tested for duplicates, since PostHog's managed imports do not deduplicate events.
How we hand over
- Handover covers the tracking configuration, event dictionary, data retention settings and the cutover runbook.
- Consent settings are reviewed with your legal team, because session recording can remove a consent exemption under CNIL guidance.
- Each handover item names an owner and its location in your environment, so your team can run it after go-live.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after cutover.
- PostHog does not offer customer support for self-hosted instances, so agree who owns incidents in writing.
- Support scope and who to call are written into any retainer before go-live.

