Importing Historical Data to Adapty
Learn how to import historical data to Adapty via CSV file
After you install Adapty SDK and release the app, you can find your users and subscribers in the Profiles section. But what if you have legacy infrastructure and want to migrate to Adapty? Or just want to see your existing data in Adapty?
You can export your data to a CSV file and then import it to Adapty. Let's see how to do that.
Data format
Export data to a CSV file with a format in this Google doc file. Fields without description are self-explained (we hope they are).
Field name | Description |
---|---|
user_id | Id of your user |
subscription_expiration_date | The date of subscription expiration, i.g. next charging date, datetime with timezone (2020-12-31T23:59:59-06:00) |
created_at | Datetime of profile creation (2019-12-31T23:59:59-06:00) |
birthday | date (2000-12-31) |
facebook_user_id | |
gender | f|m |
phone_number | |
country | format ISO 3166-1 alpha-2 |
first_name | |
last_name | |
last_seen | datetime with timezone (2020-12-31T23:59:59-06:00) |
idfa | iOS Identifier for advertiser |
idfv | |
advertising_id | It's similar to idfa, but for Android |
amplitude_user_id | |
amplitude_device_id | |
mixpanel_user_id | |
appmetrica_profile_id | |
appmetrica_device_id | |
appsflyer_id | |
adjust_device_id | |
facebook_anonymous_id | |
branch_id | |
attribution_source | appsflyer|adjust|branch|apple_search_ads |
attribution_status | organic|non_organic|unknown |
attribution_channel | |
attribution_campaign | |
attribution_ad_group | |
attribution_ad_set | |
attribution_creative | |
apple_receipt_encoded | |
google_product_id | |
google_purchase_token | |
google_is_subscription | 1|0 |
Required Fields
The required fields are user_id and apple_receipt_encoded or google_product_id+google_purchase_token+google_is_subscription, without them Adapty won't be able to fetch transactions.
If you want the cohort analytics to be very precise, please specify created_at as well, otherwise we'll have to assume that date from the first purchase date.
Here is an example of what it may look like:

Prices (only for iOS)
In order for us to fetch the prices for all iOS products, including the legacy products that will never be purchased through Adapty SDK, kindly share a docs with those prices.
You don't need to bother creating the correct format, as it is already provided by Apple. Here is how you can get it from Apple Connect:
- Open the desired subscription
- "View all Subscription Pricing" here

- And "Export as CSV" here

And below is an example. We'll understand the products' ids from the files' names, so please name the files manually. For some reason, Apple doesn't mention the product name elsewhere, so it must be done manually. If there are several files, please add them to an archive to make sure nothing gets lost.

Import data to Adapty
Right now we don't have an automatic tool for that. Please contact us using the website (we use Intercom in the bottom right corner) or just email us at [email protected].
Do not worry - importing historical data will not create any duplicates, even if that data overlaps with the one you already have in Adapty.
Updated 4 months ago