Migrating from GA4 or Heap to Mixpanel or Amplitude

A successful analytics migration preserves the meaning of your important reports while making the next analysis easier. Moving every old event is not enough. If identities split, clicks become completed outcomes or a backfill changes the live customer profile, the new dashboard can look convincing and still be wrong.

Jafrin Akter AloLast updated 15 min read
On this page
Pink folders cross a lime bridge between two white archive boxes, beside Move to Mixpanel or Amplitude.

What must still work after the analytics migration?

Preserve the decisions and reports the team already depends on. First compare product analytics platforms before you migrate, so the destination fixes a defined limitation rather than merely changing the interface. Choose a small set of reports such as trial activation, repeated use of a core feature and conversion to a paid account. Name the owner, counting unit, qualifying events, exclusions and observation window for each.

Document the event and identity setup to rebuild in the new tool separately from the transfer of historical records. Our product analytics implementation scopes those two jobs with their acceptance evidence.

Classify the current reports as rebuild, retire or retain in the old system. A report with no owner or current decision does not need automatic migration. A board metric with a long historical series needs a documented continuity plan even if nobody enjoys maintaining it. Use the attribution migration checklist to define the reporting evidence required before that switch.

Keep these deliverables separate: live collection, historical events, identity mappings, report definitions and downstream workflows. Cohort exports, alerts, experiments and lifecycle campaigns may depend on the old system. An event import does not establish that those dependencies have moved.

Use the tracking plan guide to agree the target event meanings before translating payloads. Record intentional definition changes. If the old “activation” event meant a button click and the new one means a successful backend operation, the historical line must show that break.

Which historical data can you actually extract?

Inventory the actual export, dates, fields and permissions before committing to historical coverage. Keep each gap visible in the migration plan.

Which historical data can you actually extract?
History componentEvidence to collectMigration consequence
Event rowsEarliest available date, missing periods and source IDsSets the reproducible event history
Event definitionsTrigger logic and changes over timeDistinguishes a rename from a changed business fact
Identity relationshipsSource IDs, application IDs and merge historyDetermines which activity belongs to the same person
Report definitionsFilters, cohort rules, timezone and denominatorMakes the old/new comparison interpretable
Dependent workflowsCohorts, campaigns, experiments and alertsNeeds separate replacement and cutover ownership

From GA4

Inspect the existing BigQuery dataset before promising historical coverage. Record the earliest available date, missing dates, included streams and the fields present during each period. A recent link or an old dashboard is not evidence that the underlying raw events are available for import.

Google's BigQuery export documentation distinguishes raw exported events from the additional processing in Analytics reports. It also describes daily tables and best-effort streaming exports. Use completed daily data for historical work where available, and account for late updates rather than treating intraday data as a final archive.

An aggregate such as “200 signups last month” cannot reconstruct which people signed up, their event order or the properties attached to each signup. Preserve useful aggregate history as a reference series when raw records are unavailable. Do not manufacture individual events to make the destination chart resemble the old total.

GA4 may still have a separate acquisition or advertising role after product reporting moves. Decide that explicitly before removing its collection.

From Heap

Heap Connect's schema exposes events, users, sessions and identity-related information through supported exports. Confirm your subscription's export access, the events selected for sync and the actual history available. An export entitlement is part of the migration scope, not an assumption to discover at cancellation.

Heap warns that one physical event can appear in multiple event-definition tables with the same event ID. For example, one click might match both “Connect Button” and “Onboarding CTA.” Importing both as independent copies of the same target event inflates activity.

Export the relevant definition logic alongside the rows. Decide whether overlapping definitions become one canonical event, separate intentional analytical events or properties. Preserve the original ID so the decision can be checked.

Heap's sync documentation says changing a labeled event can rebuild its downstream table. Freeze a versioned export for each import batch. A table that changes during the migration is not a stable manifest of what you sent.

How should you map identities before importing?

Build a versioned crosswalk from source identifiers to stable application people and accounts. An analytics platform's internal user key is not necessarily your application's person ID. Preserve the source IDs, but select a stable application identity for known people and a separate device identity for anonymous activity. Keep account and workspace IDs distinct from both.

For Heap S3 exports, the identity-resolution documentation specifically requires handling user migrations; S3 does not resolve them for you. Its warehouse export behavior differs. Verify the export mode rather than copying an S3 recipe to every destination.

Build the crosswalk from authoritative mappings. If two old records cannot be confidently connected, keep the uncertainty visible. Matching a company domain does not prove that two people are the same person. Do not merge every employee into the billing contact.

Mixpanel distinguishes Original and Simplified ID Merge. Check the target project's mode before implementing identity calls. A populated project cannot simply switch modes. An old alias recipe is not a universal migration instruction.

Amplitude uses device, user and Amplitude IDs. Send the same stable known-user ID in live and historical data. Do not assign a fake shared user ID to anonymous records or assume differently assigned known-user IDs will become one person automatically.

Test a known user on two devices, an anonymous visitor who signs up, logout followed by another user, and a person switching workspaces. Compare both the event history and the report population. Our identity merge guide explains the mapping and failure cases in more detail.

What should every staged historical event retain?

Retain source provenance, occurrence time, stable identity and the canonical business meaning before building destination payloads. Each staged event should retain the source system and project, original event ID, canonical event name, occurrence time, relevant identities and approved properties.

This illustrative record describes your migration staging layer. It is not a valid vendor API request as written:

JSON
{
  "source_system": "heap",
  "source_project": "project_demo",
  "source_event_id": "event_104",
  "source_actor_id": "heap_user_901",
  "event_name": "integration_connected",
  "occurred_at": "2026-09-28T12:34:56.123Z",
  "user_id": "user_27",
  "anonymous_id": null,
  "account_id": "account_8",
  "properties": {
    "integration_type": "crm"
  },
  "migration_batch": "history_2026_09"
}

Keep the occurrence time separate from export and ingestion times. Preserve the source time zone and precision during conversion. A seconds-versus-milliseconds mistake can move an event by decades; silently truncating precision can also collapse records that were distinct.

Review property types and meaning. A string "false" is not the boolean false. A user's current plan is not necessarily the plan at event time. Revenue needs a clear amount representation and currency, and retries need a stable business operation ID.

For a source without a reliable unique event ID, establish a persistent staging key from available source evidence and test its uniqueness. Person ID plus timestamp is not universally sufficient. Do not generate a fresh random key every time you reread the same export.

How do repeated batches avoid duplicates without losing real events?

Use one deterministic migration ID for each intended target event. Heap's duplicate-ID guidance uses source user ID plus event ID for an individual event table. Preserve that compound source key before mapping destination identity. This original Python helper includes both, plus the project, source and canonical event name. All five inputs must be stable across retries:

Python
import hashlib
import json


def migration_event_id(source, project, original_actor, original_id, canonical_event):
    parts = [source, project, original_actor, original_id, canonical_event]
    if any(not isinstance(value, str) or not value.strip() for value in parts):
        raise ValueError("All identity parts must be nonempty strings")
    encoded = json.dumps(parts, ensure_ascii=False, separators=(",", ":"))
    return hashlib.sha256(encoded.encode("utf-8")).hexdigest()[:36]

The helper keeps the first 36 hexadecimal characters so its output fits Mixpanel's documented $insert_id limit of 36 bytes and permitted character set. Keep the five-part source key in the ledger too, and reject any generated-ID collision between different keys before upload; hashing is not proof of uniqueness.

The batch label is deliberately absent. Retrying an event in a new batch should not create a new identity. Freeze the source-key and event-name mappings too: changing the canonical name changes this key. A corrected mapping requires a controlled replacement or repair plan, not an unexamined rerun.

Consider an illustrative Heap export with six rows for the same source user. All rows below map to the same intended canonical event name. Row counts and intended event counts are units, not vendor charges.

How do repeated batches avoid duplicates without losing real events?
Source eventExport rowsReasonIntended target events
e1012Overlapping labelled definitions describe one occurrence1
e1021One ordinary occurrence1
e1032A repeated export includes the same occurrence1
e1041A different occurrence with its own source ID1
Total6Repeated rows must agree on payload content4

After mapping the overlapping definitions intentionally, the expected result is four target events. Keep the original table/definition provenance in staging so a reviewer can explain why two rows became one event.

A conflicting amount, timestamp or user mapping is not a harmless duplicate. Quarantine it for a defined correction decision. Conversely, two real events from the same user at the same timestamp must survive when they have distinct source IDs.

Maintain a batch ledger containing source file checksum, mapping version, source row count, intended distinct-event count, submitted IDs, accepted count and unresolved errors. Vendor deduplication is an additional protection. It does not replace a durable record of what your job already sent.

Which import contract should the migration worker follow?

Follow the selected destination endpoint, project region, identity mode and response contract. An import worker must distinguish a completely failed request from a partially accepted batch. Compare Mixpanel and Amplitude API limits and export windows before sizing batches or reconciling imported history.

These are request payload limits, not an allowance for total historical usage or a promise of processing speed.

Which import contract should the migration worker follow?
Import pathPayload boundaryRetry identityAcceptance check
Mixpanel Import EventsUp to 2,000 events and 10 MB uncompressed per requestPreserve event, identity, timestamp and $insert_idInspect per-record failures even with HTTP 400
Amplitude Batch Event UploadUp to 2,000 events and 20 MB per requestPreserve device identity and insert_id; retain an external ledgerInspect the response and destination records

Sources: Mixpanel Import Events and Amplitude Batch Event Upload.

Importing into Mixpanel

Use strict=1 validation with Mixpanel Import Events. HTTP 400 can still include valid ingested records from a partly invalid batch. Repair the listed failures and reconcile the accepted count before retrying.

Map the stable migration ID to $insert_id, alongside the correct event name, identity and time. Choose the region and authentication documented for the actual project. Validate a small sample in a test project before increasing volume.

Mixpanel's deduplication reference distinguishes query-time behavior from raw exports and later compaction. It does not promise general upsert behavior. Do not treat resending a changed payload as a guaranteed historical correction, and do not interpret every duplicate in a raw export as a duplicated report result.

Importing into Amplitude

Amplitude’s Batch Event Upload API follows its HTTP event format and uses the project’s regional ingestion endpoint. The current page limits traffic per API key to 1,000 events/second for an individual user or device; throttle by that scope rather than assuming a larger batch permits an unlimited per-user burst. Its response guidance also lists 2,000 events per batch and 500,000 events per day for a user or device. Apply both the request-size and per-identity limits when scheduling the backfill.

The HTTP V2 contract uses Unix milliseconds for event time and documents deduplication using insert_id with device identity within a seven-day window. Map your stable event key correctly and keep an external ledger for reruns beyond that window. A newly generated device ID on each retry undermines the intended identity and deduplication behavior.

Amplitude's self-service migration panel lists Amplitude, Mixpanel and PostHog as sources across all plan tiers, including the EU data centre. It does not list GA4 or Heap. Those sources need an export, transformation and supported import path. The page also says migrated events count toward monthly event volume.

For either destination, inspect rejected records, throttling and accepted counts. Log only the identifiers and error details needed for diagnosis. A successful transport response is one checkpoint; the expected events and identities must also appear correctly in reports.

How much history is worth importing?

Import history that supports a named comparison. A twelve-month renewal question may justify more coverage than a newly launched feature. Keep rarely used legacy history in a documented archive when importing it adds cost or confusion without changing a decision.

Amplitude's backfill guidance identifies two important side effects: historical user properties can overwrite current values, and earlier events can move a user's first-seen date. It documents $skip_user_properties_sync for avoiding the profile update. With that setting, the event carries only the supplied user properties and does not inherit pre-existing profile values. Include the historical fields the report needs and test the chosen treatment before loading the whole period.

A separate historical project can isolate old definitions, but it also separates that history from live journeys. A combined project supports continuity only when identity and event meaning match. Choose deliberately and label the boundary for report readers.

Backfill cost includes extraction, warehouse processing, destination ingestion, validation and the people resolving exceptions. Confirm commercial treatment before sending the full dataset. The product analytics pricing guide explains why an old event timestamp is not sufficient evidence that an import will be free.

Record exactly which history was retained, omitted or transformed. Never give a chart an apparently continuous date range when its event definition changed silently halfway through.

How should live collection and the backfill overlap?

Start the new live path before retiring the old one. Send equivalent, permitted business observations to both destinations and validate the adapters separately. Preserve destination-specific collection rules rather than assuming permission or payload fields transfer automatically.

Choose a documented cutoff between historical and live data. A useful partition is historical events with occurrence time before timestamp T and live events at or after T. Then account for late-arriving records, queued clients and failed deliveries. The timestamp rule alone does not prove complete coverage.

If backfill and live collection overlap, either preserve the same stable event identity across both producers or exclude records already accepted through the other path. Separate random IDs for the same operation can defeat deduplication even when each producer works correctly on its own.

Prove the history and identities you can actually migrate before loading volume. Keep the old reporting route available while small imports, live overlap and dependent workflows are checked; documented gaps are safer than invented event continuity.

How the workflow fits together
Define required reports, verify export history and identity mappings, test a small permitted import, then reconcile historical and live collection with a durable ledger before approving cutover, rollback and retirement of unused dependencies.
Read diagram as text
  • Define priority reports meanings and downstream dependencies to Available history and authoritative identity mappings support the scope?.
  • Available history and authoritative identity mappings support the scope? to Preserve the gaps or archive and narrow the migration scope: No.
  • Preserve the gaps or archive and narrow the migration scope to Define priority reports meanings and downstream dependencies.
  • Available history and authoritative identity mappings support the scope? to Stage permitted records and run a small versioned import: Yes.
  • Stage permitted records and run a small versioned import to Events identities retries and profile effects pass acceptance?.
  • Events identities retries and profile effects pass acceptance? to Quarantine conflicting records and repair the mapping: No.
  • Quarantine conflicting records and repair the mapping to Stage permitted records and run a small versioned import.
  • Events identities retries and profile effects pass acceptance? to Run live overlap with the historical ledger and cutoff rules: Yes.
  • Run live overlap with the historical ledger and cutoff rules to Reports dependencies and rollback are accepted by their owners?.
  • Reports dependencies and rollback are accepted by their owners? to Resolve discrepancies while the old route remains available: No.
  • Resolve discrepancies while the old route remains available to Run live overlap with the historical ledger and cutoff rules.
  • Reports dependencies and rollback are accepted by their owners? to Move dependencies and retire only unneeded old collection: Yes
Open full diagram

Reconcile in layers: accepted business operations, intended canonical events, identified people or accounts, then the report. Align filters, time zones, funnel order and observation windows before comparing results.

Use an acceptance ledger for a backend-controlled cohort. This fictional example covers the same set of completed setup operations.

How should live collection and the backfill overlap?
CheckpointCount or rateInterpretation
Accepted setup operations in the application250Authoritative expected population
Unique qualifying operations at the destination247Matched by the stable operation ID
Delivery coverage98.8%247 ÷ 250 × 100
Missing operations3Each needs an explanation and owner
Coverage gap1.2%3 ÷ 250 × 100

Investigate the three IDs and their causes. A generic “within 5%” tolerance would conceal a known defect rather than establish a reliable migration.

Browser-only populations may differ because of permitted collection, blockers or device conditions. Explain those differences separately. Do not set a universal demand that every headline user total match exactly across tools.

When is it safe to switch reports and retire the old system?

Switch reporting after the owners accept the reproduced definitions, remaining differences and recovery plan. Decide whether to keep GA4 alongside the new tool before retiring any acquisition or advertising dependency.

The report owner should approve the reproduced definitions and documented differences. Engineering should approve collection and recovery behavior. The people operating campaigns or alerts should confirm that their dependencies point to the new source and will not fire twice during the transition.

Write a rollback plan before the reporting switch. Define the condition that returns decision-making to the previous report, the person authorized to act and how ongoing data will remain available. Rolling back a dashboard does not automatically undo imported identities or restore a dataset that was deleted.

Keep the agreed reference exports and old definitions for the approved retention period. Remove unnecessary access and collection only after dependencies are accounted for. Confirm cancellation terms and the remaining ability to export before ending the old subscription.

Checklist

  • Priority reports have owners and explicit counting rules.
  • Export coverage, gaps and plan entitlements are documented.
  • Identity mappings pass known and anonymous journey tests.
  • Overlapping Heap definitions have an intentional target mapping.
  • Stable event IDs and a durable import ledger support safe retries.
  • Rejected records and partial successes are accounted for.
  • Backfill cannot silently overwrite approved live profile values.
  • Historical and live boundaries include a late-arrival policy.
  • Important discrepancies have explanations and named owners.
  • Downstream workflows, rollback and retirement are approved.

Our product analytics service can help scope the mapping, backfill and acceptance work. For a migration scope, bring the source platform, available export period, approximate volume, identity model and the reports that must survive. Those details are more useful than a promise to “move everything.” If the scope is still unclear, get the $99 martech audit to identify the reports and dependencies that need to survive.

Keep reading

Browse all Product Analytics guides

Questions people ask

What if a person’s data was deleted after the export snapshot was taken?

Reconcile the snapshot against the current authorised exclusion and deletion process before importing it. Preserve enough restricted evidence to prevent the deleted person’s history being recreated, without turning the exclusion ledger into another unnecessary copy of their data. Apply the approved policy to retries and archives as well. A valid old export is not continuing authority to restore every row it contains.

Should a backfill be allowed to trigger lifecycle campaigns?

Keep historical ingestion separate from live customer action until the workflow owner approves its effects. Inventory destinations that consume events or cohorts, then test whether old activity can enrol people, create tasks or send messages. Disable or isolate the affected action path during the controlled test. A correct historical analytics event does not automatically represent a new reason to contact the customer today.

Who should receive operational alerts while both platforms run?

Assign a single owner for each business incident, with the second system’s alert clearly labelled as validation evidence where appropriate. Record which path can page the operator or create a customer task. Otherwise, one failure can open duplicate incidents and make the comparison harder to interpret. Test that retiring an old notification removes only the duplicate route, while the new owner still receives the required warning.

How does moving analytics to another data region change the plan?

Treat the region change as a separate boundary in access, transfer and retention review. Confirm the source export path, destination project, ingestion endpoint and permitted storage locations before copying data. Credentials and a working endpoint do not establish that the transfer is approved. Keep the region choice in the migration record and test the selected project rather than inferring it from the hostname of the dashboard.

What if historical identities are hashes whose original mapping is unavailable?

Preserve those values as opaque source identities and document the missing crosswalk. Do not guess the original person or merge records because the hashes look similar. Establish whether an authoritative source can supply a permitted mapping; if it cannot, keep the affected history separate from identified journeys or narrow the migration scope. A partial, explained history is more useful than confidently attaching activity to the wrong customer.

Sources

  1. Google Analytics: BigQuery export and reporting differences.
  2. Heap: Connect export schema.
  3. Heap: Duplicate event IDs across definition tables.
  4. Heap: Changes during data sync.
  5. Heap: S3 identity resolution.
  6. Mixpanel: Identity management modes.
  7. Amplitude: Device and user identity.
  8. Mixpanel: Import Events contract.
  9. Mixpanel: Event deduplication.
  10. Amplitude: Batch Event Upload API.
  11. Amplitude: HTTP V2 event format and deduplication.
  12. Amplitude: Supported self-service migration sources.
  13. Amplitude: Historical backfill side effects.
Portrait of Jafrin Akter Alo

Written by

Jafrin Akter Alo

Data Engineer and Co-founder at Martechdevs and Growth and Analytics Partners

Jafrin writes practical guides to marketing technology, customer data, analytics and AI workflows. Martechdevs is a Growth and Analytics Partners company.

View LinkedIn profile

Book a Free Call

Thirty minutes on your stack and what it needs. Free, and no pitch.

Thirty minutes, and you leave with a plan

We look at what you have, what it is costing you and what to do about it first.

  • 30 minutes
  • Video call, link on booking
  • No obligation

What we'll cover

  • Your current stack and where it hurts
  • Quick wins we can ship first
  • An integration roadmap
  • Timeline, scope and next steps

Calendar not loading? Open it in a new tab or email hello@martechdevs.com.