Order history data

To optimize prospecting campaigns (which acquire new customers), AppLovin highly recommends that you provide AppLovin with order history data. This allows AppLovin to build an accurate model of your existing customers so it can find new, high-value users.

If you are a Shopify user who installed the AppLovin Shopify app and connected it to your Ads Manager account, you’re ready!

Otherwise, follow the requirements below to upload this data in CSV form.

Providing customer data to AppLovin is subject to your own privacy compliance requirements, including any necessary notices and consents.

File upload requirements

  • File format: CSV only.
  • File size: Maximum file size of 200 MB per file.
  • Upload method: You can upload files directly, or via secure transfer methods (e.g. SFTP).
  • Multiple files: You can upload multiple files. The data from each new file are added to your existing backfilled data.
  • Deduplication: AppLovin automatically deduplicates orders based on the transaction_id. AppLovin ignores any data row with a transaction_id that already exists in its system. If rows with duplicate transaction_ids exist in a single file, AppLovin keeps the one with the earliest event_timestamp and discards the rest.

Field specifications

Your CSV file must include all the required headers listed below, though certain fields are optional to populate.

The column order does not matter, but the header names must match exactly.

Event window: AppLovin strongly encourages you to upload all available order history.

FieldValue required?TypeDescriptionValue
country_codeYesStringAn ISO 3166 country codeUS
currencyYesStringThe currency of the transaction in ISO 4217 format (3-letter code)USD
emailYesStringThe customer’s email address. Provide the plaintext email; AppLovin will hash it on its side.customer@example.com
event_nameYesStringMust be purchasepurchase
event_timestampYesStringThe time the purchase occurred
  • ISO 8601 format (UTC)
  • ISO 8601 format (offset)
  • Unix Timestamp
  • mm/dd/yyyy
  • 2025-11-10T15:30:00Z
  • 2025-11-10T15:30:00+01:00
  • 1459315678
  • 11/10/2025
transaction_idYesStringA unique identifier for the order (e.g., order ID, checkout ID). This is crucial for deduplication.txn_12345
user_idYesStringYour internal customer ID.user_abc123
valueYesDoubleThe total value of the transaction. Must be a number greater than or equal to 0. Do not include currency symbols.99.99
zipNoStringThe customer’s zip code. This must be the billing zip code of the transaction. For U.S. zip-codes, only include the first five digits.12345
idfvNoStringThe user’s identifier for vendors.f325g3gb-12fc-352f-c6c3-dz52f0f690d8
ifaNoStringThe user’s identifier for advertisers. This is either IDFA or GAID.918f1d4f-d195-4a8b-af47-44683fe11db9
phoneNoStringThe customer’s phone number. Must include the country code (e.g., +1). Provide the plaintext number; AppLovin will hash it on its side.+14155551234

AppLovin hashes plaintext email addresses and phone numbers that you provide.

If you would prefer to perform your own hashing, do so by carefully following these guidelines:
email
Remove any leading or trailing whitespace. Convert any uppercase characters to lowercase. Then hash via SHA256. Any email in wrong format should produce empty value.

For gmail.com and googlemail.com only, first remove all periods before the @, and remove the first plus sign and everything after it. Leave the domain unchanged. If nothing remains before the @, produce an empty value.

phone
Remove any leading or trailing whitespace. Also remove any leading zeros. Remove any dashes, plus-signs, or other symbols. Convert any letters to their numerical counterparts. Always include the country code (for example, 1 for United States phone numbers). Then hash via SHA256.

For example (for email addresses):

InputNormalizedSHA256
Alice@Example.COMalice@example.comff8d9819fc0e12bf0d24892e45987e249a28dce836a85cad60e28eaaa8c6d976
J..A.NE+work.more+extra@GMAIL.COMjane@gmail.com988b074286b20c503e3015c2076533f3bf4ce5ca6f8a507ab52c2e0f98d620b7
Jane.Doe+Work@GoogleMail.comjanedoe@googlemail.com338abf9ef1c8793cadc7bcf51ed595338eb727ed9e06ce3d91d566d60b975937

Reference implementations follow. Each one prints the hash for the second example above; run it and confirm you get the same value.

#include <algorithm>
#include <cctype>
#include <iostream>
#include <regex>
#include <string>

#include <openssl/sha.h>

std::string normalizeAndHash(std::string email)
{
    email.erase(0, email.find_first_not_of(" \t\n\r\f\v"));
    email.erase(email.find_last_not_of(" \t\n\r\f\v") + 1);
    std::transform(email.begin(), email.end(), email.begin(),
                   [](unsigned char c) { return std::tolower(c); });

    static const std::regex valid("^[!-?A-~]+@[!-?A-~]+$");
    if (!std::regex_match(email, valid))
        return "";

    const auto at = email.find('@');
    std::string local = email.substr(0, at);
    const std::string domain = email.substr(at + 1);
    if (domain == "gmail.com" || domain == "googlemail.com")
    {
        local = local.substr(0, local.find('+'));
        local.erase(std::remove(local.begin(), local.end(), '.'), local.end());
        if (local.empty())
            return "";
    }

    const std::string normalized = local + "@" + domain;
    unsigned char hash[SHA256_DIGEST_LENGTH];
    SHA256(reinterpret_cast<const unsigned char*>(normalized.data()),
           normalized.size(), hash);

    static constexpr char digits[] = "0123456789abcdef";
    std::string out;
    for (const unsigned char value : hash)
    {
        out += digits[value >> 4];
        out += digits[value & 15];
    }
    return out;
}

int main()
{
    std::cout << normalizeAndHash("  J..A.NE+work.more+extra@GMAIL.COM  ") << "\n";
}

Key validation rules

  • Headers: The file must contain all the required headers listed above.
  • Identifier requirement: Each row must contain a user_id and email. AppLovin rejects rows that are missing values for those columns.
  • Event name: The event_name column must exist and its value must be purchase.
  • Transaction value: The value column must contain a non-negative number (≥0).
  • Country code: AppLovin does not accept order history data relating to customers in the following countries/regions:
    • AX — Åland Islands
    • AD — Andorra
    • AT — Austria
    • BE — Belgium
    • DK — Denmark
    • FO — Faroe Islands
    • FI — Finland
    • FR — France
    • DE — Germany
    • GI — Gibraltar
    • GR — Greece
    • GG — Guernsey
    • IS — Iceland
    • IE — Ireland
    • IM — Isle of Man
    • IT — Italy
    • JE — Jersey
    • LI — Liechtenstein
    • LU — Luxembourg
    • MT — Malta
    • MC — Monaco
    • NL — Netherlands
    • NO — Norway
    • PT — Portugal
    • SM — San Marino
    • ES — Spain
    • SJ — Svalbard & Jan Mayen
    • SE — Sweden
    • CH — Switzerland
    • GB — United Kingdom

Example CSV file

Here is an example of a valid CSV file:

event_name,user_id,phone,email,event_timestamp,value,currency,transaction_id,country_code,zip,idfv,ifa
purchase,user_abc123,+14155551234,user@example.com,2025-11-10T16:45:00Z,99.99,USD,txn_12345,US,12345,f325g3gb-12fc-352f-c6c3-dz52f0f690d8,918f1d4f-d195-4a8b-af47-44683fe11db9
purchase,user_def456,+14155555678,customer@example.com,2025-11-10T16:45:00Z,149.5,USD,txn_67890,US,12345,f325g3gb-12fc-352f-c6c3-dz52f0f690d8,918f1d4f-d195-4a8b-af47-44683fe11db9
purchase,user_ghi789,+14155559012,shopper@example.com,2025-11-10T17:20:00Z,75,EUR,txn_11223,US,12345,f325g3gb-12fc-352f-c6c3-dz52f0f690d8,918f1d4f-d195-4a8b-af47-44683fe11db9

search