Migrate your analytics data from Amplitude
Step-by-step guide to migrating product analytics from Amplitude to Statsig, including event mapping, user identity, and metric parity.
Statsig is an all-in-one platform that combines analytics, experimentation, and feature flagging. Migrating Amplitude data into Statsig usually involves two steps: export and ingest. This guide provides the essentials. For anything beyond these basics, contact Statsig.
Step 1. Export your data from Amplitude
Amplitude offers a few different export methods. Pick the one that matches your data size and setup:
1. S3 Export
For high volume backfills, dump your Amplitude data into an S3 bucket.
2. Warehouse Export
If your Amplitude data is already in Snowflake, BigQuery, or Redshift, you can skip file downloads. Statsig ingests directly from these warehouses (refer to Step 2.1).
3. Export API
Use Amplitude's Export API to pull gzipped JSON
- Limit: 4 GB per request so use hourly windows for large ranges
- Example:
curl --location --request GET 'https://amplitude.com/api/2/export?start=<starttime>&end=<endtime>' \
-u '{api_key}:{secret_key}'
4. UI Download (CSV/JSON)
Go to Organization Settings → Project → Export Data
- Best for small datasets or initial testing
Step 2. Transform your data
Amplitude and Statsig store events in slightly different formats. Map your Amplitude data to Statsig's format before importing, regardless of which import method you use in Step 3.
| Amplitude field | Statsig field |
|---|---|
event_type | event |
event_time | timestamp (ms since epoch) |
user_id | user.userID |
device_id | user.stableID |
event_properties | metadata |
user_properties | user fields |
Before transform
// Amplitude event
{
"event_type": "purchase",
"user_id": "123",
"device_id": "device_abc",
"event_time": "2023-08-17T00:00:00Z",
"event_properties": {
"amount": 25,
"currency": "USD"
},
"user_properties": {
"plan": "premium"
}
}
After transform
// Statsig event
{
"event": "purchase",
"user": {
"userID": "123",
"stableID": "device_abc",
"plan": "premium"
},
"timestamp": 1692230400000,
"metadata": {
"amount": 25,
"currency": "USD"
}
}
Step 3. Import into Statsig
After your data is in Statsig event format, choose an import path based on how you exported:
| If you exported from Amplitude via... | Import into Statsig using... | Best when... |
|---|---|---|
| S3 export | S3 ingestion | You're backfilling large datasets |
| Warehouse (Snowflake/BQ/Redshift) | Warehouse ingestion | Your Amplitude data already lives in a warehouse |
| Export API | Event Webhook | You're moving a few days/weeks of data programmatically |
| UI download (CSV/JSON) | Event Webhook | You're testing or moving a small slice of data |
S3 ingestion
- Ensure files are transformed to the Statsig schema in Parquet, JSON, or CSV format, then follow the Statsig S3 ingestion steps.
- Shard your Amplitude raw data into one day per directory before ingesting into Statsig.
Warehouse ingestion
- Connect your warehouse to Statsig
- Point Statsig at a query that outputs events in the expected schema
- Statsig ingests on a recurring schedule
UI download or Export API
To get these events into Statsig, replay them through the Event Webhook. Take each row or JSON object, reshape it to Statsig format, and send it one at a time or in small batches.This approach is best for test runs or initial migrations, not for millions of events.
curl -X POST https://api.statsig.com/v1/webhooks/event_webhook \
-H "Content-Type: application/json" \
-H "STATSIG-API-KEY: $STATSIG_SERVER_SECRET" \
-d '{
"event": "signup",
"user": { "userID": "abc" },
"timestamp": 1692230400000
}'
Get migration help
If you are unsure how to approach this migration, contact the Statsig team. Statsig has worked closely with customers migrating from Amplitude and can provide hands-on support.
Reach out to the support team, your sales contact, or through the Slack community.Was this helpful?