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 nameDescription
user_idId of your user
subscription_expiration_dateThe date of subscription expiration, i.g. next charging date, datetime with timezone (2020-12-31T23:59:59-06:00)
created_atDatetime of profile creation (2019-12-31T23:59:59-06:00)
birthdaydate (2000-12-31)
email
facebook_user_id
genderf|m
phone_number
countryformat ISO 3166-1 alpha-2
first_name
last_name
last_seendatetime with timezone (2020-12-31T23:59:59-06:00)
idfaiOS Identifier for advertiser
idfv
advertising_idIt'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_sourceappsflyer|adjust|branch|apple_search_ads
attribution_statusorganic|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_subscription1|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:

919

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:

  1. Open the desired subscription
  2. "View all Subscription Pricing" here
546
  1. And "Export as CSV" here
1788

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.

1018

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.