Skip to main content
If you haven’t already, we recommend starting with our Migration Guides Overview as it details the key components of migrating to Mixpanel from other analytics tools. Below we outline specific steps and considerations when migrating from Google Analytics.

Currently using Google Analytics 4 (GA4) and not seeing value?

Try unifying your marketing and product data in one place. This guide will outline the steps needed in order to bring your GA4 data into Mixpanel allowing you to dig deeper into how users across different channels are interacting with your product, learn where the points of friction are, and where you should be investing your marketing spend to maximize engagement with your product.

Loading historical data

Given GA4 has a similar data format to Mixpanel, it is possible to migrate some of your historical data to see trends. In the cases where historical data is essential, we recommend loading a year’s worth (or less) of historical data during your migration. This will allow your team to review year-over-year trends easily and do historical analysis as needed. Note that backfilling historical data can have significant impact on your billing. Refer to this section for more details.

Loading historical data via Mixpanel BigQuery Warehouse Connector

image
At a high-level, the migration consists of 4 steps:
  1. Set up a new Mixpanel project which is on Simplified ID Merge system.
  2. Set up GA4 BigQuery Export following the instructions here.
  3. Set up Mixpanel Warehouse Connector to initiate data sync from BigQuery to Mixpanel
Pre-migration data audit
Before migrating your data to Mixpanel, you should conduct a data audit to quickly identify the key events and properties that you want to migrate over. You can learn more about the importance of pre-migration data audit here. The following SQL queries can be used to conduct a data audit in BigQuery. SQL query to return events by volume:
SQL query to return event properties by volume:
SQL query to return sample values of the event properties:
SQL query to return user properties by volume:
Setting up BigQuery Warehouse Connectors
Our Warehouse Connector will automatically detect GA4 datasets in BigQuery. You can use this to migrate your historical data from BigQuery to Mixpanel as well as seamlessly import new data going forward. Once you’ve given your new Mixpanel project, that is leveraging Simplified ID Merge, access to your BigQuery Instance in the Warehouse Sources tab of your project settings it’s time to import your data. Navigate to Project Settings → Warehouse Data and click +Event Table. Under setup select your BigQuery source you gave Mixpanel access to. In the dataset drop-down, choose your GA4 dataset, then select the GA4 events table. Your Event Name, Event Time, and Distinct ID columns will automatically map for you. If you’re tracking users in an anonymous state with GA4 you can select user_pseudo_id for the Device ID column. Under sync settings select One Time to backfill the data or Append to bring in new data based on Insert Time (sync mode doesn’t include Mirror, only Append and One Time). If you choose Append for Sync Mode, set the frequency to daily. Insert time will default to event_timestamp. Preview the events and associated event properties to ensure the data looks as expected then select Create to import the data into Mixpanel.
image
Navigate to Project Settings → Warehouse Data and click +User Table. Under setup select your BigQuery source you gave Mixpanel access to. In the dataset drop-down, choose your GA4 dataset, then select the GA4 users table. Your Distinct ID column will automatically map to user_id for you. Under sync settings select One Time to backfill the data or Append to bring in new data based on Insert Time (sync mode doesn’t include Mirror, only Append and One Time). If you choose Append for Sync Mode, set the frequency to daily.
GA4 Append syncs use BigQuery’s change history (time travel) to detect newly appended rows. BigQuery retains change history for up to 7 days (configurable, minimum 2 days). If the Mixpanel sync does not run within this window, it must be reset for a full re-sync. We recommend keeping the default of 7 days to allow time to correct any unexpected access issues (e.g., a credentials change).
Preview the users and associated user properties to ensure the data looks as expected then select Create to import the data into Mixpanel. Once the import is complete, navigate to the Users tab and ensure the profiles have been imported as expected.
image
Post-migration data validation
You can use our Lexicon or Events page to check that your data has successfully been ingested. However, if your historical events are older than 30 days, they will not show up on Lexicon, Events page or in the event dropdown menu across all reports. In this case, you can leverage our Insights report to validate the historical events, by selecting the import time frame and filtering by the following default properties:
  • Warehouse Import ID (tracked as $warehouse_import_id)
  • Warehouse Import Job ID ($warehouse_import_job_id)
  • Import = true ($import)
  • Source = warehouse-import ($source)
Please filter by tracked name, $warehouse_import_id instead of the display name, “Warehouse Import ID”. You can find the properties values on the Warehouse Connector’ sync logs:
image

Track forward looking real-time data

The Warehouse Connectors support for GA4 allows you to automatically bring in your event and user data. But if you’re looking to replace tracking for your current GA4 implementation, you can follow the steps below to send live data to Mixpanel.

Client-side SDKs & Server-side SDKs

Mixpanel and GA4’s client-side SDKs have very similar developer facing APIs. This makes it fairly easy to “find and replace” embedded GA4 calls and swap them for Mixpanel calls. This section will detail the Javascript SDKs (for the sake of brevity), although both analytics platforms have fairly uniform tracking APIs for other SDKs (mobile, server-side, etc.)
Events
GA4 method
Mixpanel method