To optimize prospecting campaigns (which acquire new customers), Axon highly recommends that you provide Axon with order history data. This allows Axon 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 Shopify Axon app and connected it to your Axon Ads Manager account, you’re ready!
Otherwise, follow the requirements below to upload this data in CSV form.
Providing customer data to Axon is subject to your own privacy compliance requirements, including any necessary notices and consents.
transaction_id.
Axon 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, Axon keeps the one with the earliest event_timestamp and discards the rest.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: We strongly encourage you to upload all available order history.
| Field | Value required? | Type | Description | Value |
|---|---|---|---|---|
country_code | Yes | String | An ISO 3166 country code | US |
currency | Yes | String | The currency of the transaction in ISO 4217 format (3-letter code) | USD |
email | Yes | String | The customer’s email address. Provide the plaintext email; Axon will hash it on its side. | customer@example.com |
event_name | Yes | String | Must be purchase | purchase |
event_timestamp | Yes | String | The time the purchase occurred
|
|
transaction_id | Yes | String | A unique identifier for the order (e.g., order ID, checkout ID). This is crucial for deduplication. | txn_12345 |
user_id | Yes | String | Your internal customer ID. | user_abc123 |
value | Yes | Double | The total value of the transaction. Must be a number greater than or equal to 0. Do not include currency symbols. | 99.99 |
zip | No | String | The 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 |
idfv | No | String | The user’s identifier for vendors. | f325g3gb-12fc-352f-c6c3-dz52f0f690d8 |
ifa | No | String | The user’s identifier for advertisers. This is either IDFA or GAID. | 918f1d4f-d195-4a8b-af47-44683fe11db9 |
phone | No | String | The customer’s phone number. Must include the country code (e.g., +1). Provide the plaintext number; Axon will hash it on its side. | +14155551234 |
Axon 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:
emailphone1 for United States phone numbers).
Then hash via SHA256.
For example (for email addresses):
#include <iostream>
#include <string>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <openssl/sha.h>
std::string normalizeAndHash(const std::string& email){
std::string normalized = email;
normalized.erase(0, normalized.find_first_not_of(" \t\n\r"));
normalized.erase(normalized.find_last_not_of(" \t\n\r") + 1);
std::transform(normalized.begin(), normalized.end(), normalized.begin(), ::tolower);
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256((unsigned char*)normalized.c_str(), normalized.size(), hash);
std::ostringstream oss;
for (int i = 0; i < SHA256_DIGEST_LENGTH; ++i)
oss << std::hex << std::setw(2) << std::setfill('0') << (int)hash[i];
return oss.str();
}
int main(){
std::cout << normalizeAndHash(" John_Smith@gmail.com") << std::endl;
}using System;
using System.Text;
using System.Security.Cryptography;
class Program {
static string NormalizeAndHash(string email) {
string normalized = email.Trim().ToLower();
using (SHA256 sha256 = SHA256.Create()) {
byte[] bytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(normalized));
StringBuilder sb = new StringBuilder();
foreach (byte b in bytes)
sb.Append(b.ToString("x2"));
return sb.ToString();
}
}
static void Main() {
Console.WriteLine(NormalizeAndHash(" John_Smith@gmail.com"));
}
}import java.security.MessageDigest;
import java.nio.charset.StandardCharsets;
public class HashEmail {
public static String normalizeAndHash(String email) throws Exception {
String normalized = email.trim().toLowerCase();
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(normalized.getBytes(StandardCharsets.UTF_8));
StringBuilder hex = new StringBuilder();
for (byte b : hash) hex.append(String.format("%02x", b));
return hex.toString();
}
public static void main(String[] args) throws Exception {
System.out.println(normalizeAndHash(" John_Smith@gmail.com"));
}
}import { createHash } from "crypto";
function normalizeAndHash(email) {
const normalized = email.trim().toLowerCase();
return createHash("sha256").update(normalized).digest("hex");
}
// Example
console.log(normalizeAndHash(" John_Smith@gmail.com"));import java.security.MessageDigest
fun normalizeAndHash(email: String): String {
val normalized = email.trim().lowercase()
val bytes = MessageDigest.getInstance("SHA-256").digest(normalized.toByteArray())
return bytes.joinToString("") { "%02x".format(it) }
}
fun main() {
println(normalizeAndHash(" John_Smith@gmail.com"))
}import hashlib
def normalize_and_hash(email):
normalized = email.strip().lower()
return hashlib.sha256(normalized.encode()).hexdigest()
# Example
print(normalize_and_hash(" John_Smith@gmail.com"))import Foundation
import CryptoKit
func normalizeAndHash(_ email: String) -> String {
let normalized = email.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
let hash = SHA256.hash(data: normalized.data(using: .utf8)!)
return hash.map { String(format: "%02x", $0) }.joined()
}
print(normalizeAndHash(" John_Smith@gmail.com"))62a14e44f765419d10fea99367361a727c12365e2520f32218d505ed9aa0f62f
user_id and email.
Axon rejects rows that are missing values for those columns.event_name column must exist and its value must be purchase.value column must contain a non-negative number (≥0).AX — Åland IslandsAD — AndorraAT — AustriaBE — BelgiumDK — DenmarkFO — Faroe IslandsFI — FinlandFR — FranceDE — GermanyGI — GibraltarGR — GreeceGG — GuernseyIS — IcelandIE — IrelandIM — Isle of ManIT — ItalyJE — JerseyLI — LiechtensteinLU — LuxembourgMT — MaltaMC — MonacoNL — NetherlandsNO — NorwayPT — PortugalSM — San MarinoES — SpainSJ — Svalbard & Jan MayenSE — SwedenCH — SwitzerlandGB — United KingdomHere 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