どのようにお手伝いできますか?

Audiences - Configure additional identifiers for partner audience creation

  • 更新

概要:カスタムオーディエンスを広告パートナーに送信するための追加のユーザー識別子を設定します。

追加の識別子について

AppsFlyer Audiencesは、カスタムオーディエンスを広告パートナーに送信するための以下のデバイス識別子を自動的にサポートします。

  • iOS:IDFA
  • Android (Google Play):GAID
  • Android(サードパーティのアプリストア):OAIDとIMEI

一部の広告パートナーは、追加のユーザー識別子に基づくカスタムオーディエンスのマッチングもサポートしています。オーディエンスでは、AppsFlyer SDKまたはS2SモバイルAPIを利用してこれらの識別子を特別に設定した場合に、これらを使用する選択肢を提供します。

これらの追加識別子には電話番号やメールが含まれますが、SHA256ハッシュで暗号化されている場合に限り利用できます。  このような追加識別子の使用は、追加識別子利用規約に従う必要があります。

次のステップ

  1. 使用したい追加識別子を利用可能な識別子の表から選択します。すべての広告パートナーがすべての識別子をサポートするわけではありませんので、ご注意ください。
  2. デベロッパー—以下の方法で選択した識別子を設定します。
  3. In the Audiences dashboard:

利用可能な識別子

以下の表に示されているように、1つ以上の識別子を設定できます。

追加の識別子—パラメーターとフォーマット
識別子 パラメーター名 形式 ハッシュ化前の例となる値
メールアドレス email_sha256

SDK v7.0.0 and earlier:

  • 小文字
  • 空白なし
  • SHA256ハッシュ済み

SDK v7.0.1 and later: Plain text. The SDK normalizes and hashes it automatically.

name@domain.com
電話番号
(下記注意参照)

v7.0.0 and earlier (or S2S): phone_number_sha256

v7.0.1 and later: phone_number_hashed

v7.0.0 and earlier (or S2S):

  • 記号、文字、先頭のゼロを含めない
  • 国コードを含める
  • SHA256ハッシュ済み

v7.0.1 and later: Plain text. The SDK concatenates the country code and number, normalizes, and hashes it automatically.

442070313000

電話番号 E164

(下記注意参照)

v7.0.0 and earlier (or S2S): phone_number_e164_sha256

v7.0.1 and later: phone_number_e164_hashed

v7.0.0 and earlier (or S2S):

  • E164電話番号
  • SHA256ハッシュ済み

v7.0.1 and later: Plain text. The SDK concatenates the country code and number, normalizes, and hashes it automatically.

+442070313000

電話番号_e164_sha256

異なる広告パートナーは異なる電話番号形式をサポートしています。したがって、電話番号を利用する場合は、両方の識別子を設定してください。 電話番号と電話番号 E164。

SDKリファレンスとコードサンプル

SDKを介してオーディエンスの識別子を送信する場合:

  • ハッシュ化されていないメールアドレス以外の識別子にはを使用してください。
  • ハッシュ化されたメールアドレスにはを使用してください。
    • SDK v7.0.1 and later: use setUserEmail.
    • SDK v7.0.0 and earlier: use setUserEmails.
  • Objective-C Swift
    • SDK v7.0.1 and later: use setUserPhone (recommended).
    • SDK v7.0.0 and earlier: use setAdditionalData with custom data.

Note

Keep the following version-dependent changes in mind:

  • Email: As of SDK v7.0.1, setUserEmails (iOS/Android) has been fully removed and replaced by setUserEmail. This is a breaking change, not a deprecation. Apps on v7.0.0 and earlier must keep using setUserEmails. Apps on v7.0.1 and later must switch to setUserEmail. Check your integrated SDK version before choosing which sample to follow.
  • Phone: As of SDK v7.0.1, a dedicated setUserPhone API is available. It's the recommended way to send phone number identifiers for Advanced Matching. This isn't a breaking change: setAdditionalData still works. For new integrations, and for customers who upgrade to v7.0.1 and later, we recommend migrating to setUserPhone. Apps on v7.0.0 and earlier must continue using setAdditionalData, because setUserPhone doesn't exist in those SDK versions.

iOS SDKの設定

ハッシュ化された電話番号を追加のユーザー識別子として設定するには:

SDK v7.0.0 and earlier — setAdditionalData

Objective-C
NSDictionary *customData = @{
  @"audiences": @{
    @"phone_number_sha256": @"6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37",
    @"phone_number_e164_sha256":@"F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E"
  }
};
[[AppsFlyerLib shared] setAdditionalData:customData];
Swift
Objective-C Swift

JavaKotlin

You must pre-hash both values (SHA-256) before passing them in.

SDK v7.0.1 and later — setUserPhone (recommended)

Method signature

- (void)setUserPhone:(NSString *_Nonnull)countryCode
phoneNumber:(NSString *_Nonnull)phoneNumber;

使用例

Objective-C
[[AppsFlyerLib shared] setUserPhone:@"1" phoneNumber:@"(650) 555-1212"];
Swift
AppsFlyerLib.shared().setUserPhone(countryCode: "1", phoneNumber: "(650) 555-1212")

Java Kotlin

Pass the country dialing code and local number as plain text. Symbols and spaces are allowed in the local number. The SDK concatenates, normalizes, and hashes both values locally (SHA-256). Don't pre-hash.

ハッシュ化されたメールアドレスを追加のユーザー識別子として設定するには:

SDK v7.0.0 and earlier

メソッドシグネチャ

- (void)setUserEmails:(NSArray<NSString *> *_Nullable)userEmails 
withCryptType:(EmailCryptType)type;

Usage example

Objective-C
NSArray *emails = @[@"name@domain.com"];    
[[AppsFlyerLib shared] setUserEmails:emails withCryptType:EmailCryptTypeSHA256];
Swift
let emails: Array = ["name@domain.com"]
AppsFlyerLib.shared().setUserEmails(emails, with: EmailCryptTypeSHA256)

SDK v7.0.1 and later

メソッドシグネチャ

- (void)setUserEmail:(NSString *_Nonnull)email;

Usage example

Objective-C
[[AppsFlyerLib shared] setUserEmail:@"name@domain.com"];
Swift
AppsFlyerLib.shared().setUserEmail("name@domain.com")

オーディエンス管理画面で:

Pass the plain-text email. The SDK normalizes and hashes it locally (SHA-256). Don't pre-hash. Only a single email is accepted per call: calling setUserEmail again overrides the previously set value rather than adding to it.

Android SDKの設定

ハッシュ化された電話番号を追加のユーザー識別子として設定するには:

SDK v7.0.0 and earlier — setAdditionalData

Java
HashMap<String, Object> audiences = new HashMap<>();
audiences.put("phone_number_sha256", "6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37");
audiences.put("phone_number_e164_sha256", "F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E");
HashMap<String, Object> customDataMap = new HashMap<>();
customDataMap.put("audiences", audiences);
AppsFlyerLib.getInstance().setAdditionalData(customDataMap);
Kotlin
val audiences = hashMapOf<String, Any>(
   "phone_number_sha256" to "6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37",
   "phone_number_e164_sha256" to "F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E"
)
val customDataMap = hashMapOf<String, Any>("audiences" to audiences)
AppsFlyerLib.getInstance().setAdditionalData(customDataMap)

電話番号_sha256

You must pre-hash both values (SHA-256) before passing them in.

SDK v7.0.1 and later — setUserPhone (recommended)

オーディエンス - 追加の識別子

public abstract void setUserPhone(String countryCode, String phoneNumber);

使用例

Java
AppsFlyerLib.getInstance().setUserPhone("1", "(650) 555-1212");
Kotlin
AppsFlyerLib.getInstance().setUserPhone("1", "(650) 555-1212")

電話番号_e164_sha256

Pass the country dialing code and local number as plain text. The SDK concatenates, normalizes, and hashes both values locally (SHA-256). Don't pre-hash.

ハッシュ化されたメールアドレスを追加のユーザー識別子として設定するには:

SDK v7.0.0 and earlier

Method signature

public abstract void setUserEmails(
  AppsFlyerProperties.EmailsCryptType cryptMethod,
  String... emails
);

使用例

Java
AppsFlyerLib.getInstance().setUserEmails(
  AppsFlyerProperties.EmailsCryptType.SHA256,
  "name@domain.com",
  "another_name@another_domain.com"
);
Kotlin
AppsFlyerLib.getInstance().setUserEmails(
  AppsFlyerProperties.EmailsCryptType.SHA256,
  "name@domain.com",
  "another_name@another_domain.com"
);

SDK v7.0.1 and later

Method signature

public abstract void setUserEmail(String email);

使用例

AppsFlyerLib.getInstance().setUserEmail("name@domain.com");

注意

Only a single email is accepted per call in v7.0.1 and later. Multiple emails aren't supported: calling setUserEmail again overrides the previously set value rather than adding to it.

S2Sリファレンスとコードサンプル

S2Sを経由してオーディエンスの識別子を送信する場合、すべての識別子(ハッシュ化されたメールアドレスも含む)にはパラメータを使用してください。 1つ以上の識別子を送信できます。

S2S経由で識別子を送信する

形式:

  • ネストされたJSON
  • キーの値はaudiencesでなければなりません
  • すべての値は、以下のコード例に示すように文字列化する必要があります。
  • パラメータ名は、上記の表に記載されている利用可能な識別子と一致する必要があります。

一般的な形式:

"custom_data" : { 
\"audiences\" : { \"parameter_name_a\" : \"hashed_identifer_a\", \"parameter_name_a\" : \"hashed_identifer_b\", \"parameter_name_c\" : \"hashed_identifer_c\" } }

ハッシュ化された電話番号とハッシュ化されたメールアドレスの例:

"custom_data" : {
\"audiences\" : { \"phone_number_sha256\" : \"6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37\", \"phone_number_e164_sha256\" : \"F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E\", \"email_sha256\" : \"34D31BE18022626DE6B311D6A76E791176D2691B6EEF406F524D8F56364C187A\" } }

See also

  • Audiences partner connections
  • Audiences user identifier policy