为了优化 prospecting campaigns(获取新客户的广告活动),AppLovin 强烈建议您向 AppLovin 提供订单历史数据。 这使 AppLovin 能够为您现有的客户建立精确的模型,从而寻找新的高价值用户。
如果您是安装了 AppLovin Shopify 应用并将其连接到您的 Ads Manager 账户的 Shopify 用户,那么您已经准备就绪!
否则,请按照以下要求以 CSV 格式上传此数据。
向 AppLovin 提供客户数据受您自身的隐私合规要求的约束,包括任何必要的告知和同意。
transaction_id 自动对订单进行去重。
AppLovin 会忽略系统中已存在相同 transaction_id 的任何数据行。
如果单个文件中存在具有重复 transaction_id 的行,AppLovin 将保留 event_timestamp 最早的一行,并丢弃其余行。您的 CSV 文件必须包含下面列出的所有必需表头,但某些字段是可选填充的。
列的顺序无关紧要,但表头名称必须完全匹配。
Event window: AppLovin 强烈建议您上传所有可用的订单历史记录。
| 字段 | 是否必需? | 类型 | 描述 | 示例值 |
|---|---|---|---|---|
country_code | 是 | String | ISO 3166 国家/地区代码 | US |
currency | 是 | String | ISO 4217 格式的交易货币(3 位字母代码) | USD |
email | 是 | String | 客户的电子邮件地址。请提供明文电子邮件;AppLovin 将在后台对其进行哈希处理。 | customer@example.com |
event_name | 是 | String | 必须为 purchase | purchase |
event_timestamp | 是 | String | 购买发生的时间
|
|
transaction_id | 是 | String | 订单的唯一标识符(例如订单 ID、结账 ID)。这对于去重至关重要。 | txn_12345 |
user_id | 是 | String | 您的内部客户 ID。 | user_abc123 |
value | 是 | Double | 交易的总价值。必须是大于或等于 0 的数字。请勿包含货币符号。 | 99.99 |
zip | 否 | String | 客户的邮政编码。这必须是交易的账单邮政编码。对于美国邮政编码,仅包含前五位数字。 | 12345 |
idfv | 否 | String | 用户的供应商标识符。 | f325g3gb-12fc-352f-c6c3-dz52f0f690d8 |
ifa | 否 | String | 用户的广告主标识符。这可以是 IDFA 或 GAID。 | 918f1d4f-d195-4a8b-af47-44683fe11db9 |
phone | 否 | String | 客户的电话号码。必须包含国家/地区代码(例如 +1)。请提供明文号码;AppLovin 将在后台对其进行哈希处理。 | +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:
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 和 email。
AppLovin 会拒绝这些列中缺少值的行。event_name 列必须存在,且其值必须为 purchase。value 列必须包含非负数(≥0)。AX — 奥兰群岛AD — 安道尔AT — 奥地利BE — 比利时DK — 丹麦FO — 法罗群岛FI — 芬兰FR — 法国DE — 德国GI — 直布罗陀GR — 希腊GG — 根西岛IS — 冰岛IE — 爱尔兰IM — 马恩岛IT — 意大利JE — 泽西岛LI — 列支敦士登LU — 卢森堡MT — 马耳他MC — 摩纳哥NL — 荷兰NO — 挪威PT — 葡萄牙SM — 圣马力诺ES — 西班牙SJ — 斯瓦尔巴和扬马延SE — 瑞典CH — 瑞士GB — 英国以下是有效 CSV 文件的示例:
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