Batch.com SDKとの連携

Adjust SDKとBatch.comイベントを連携させるには、以下のいずれかのメソッドを実行します。

事前準備

この機能を利用するには、まずお使いのプラットフォーム用のAdjust SDKをダウンロードして設定してください。以下のリンク先の説明に従って、設定を開始してください。

⚙️ iOS / Android

AdjustとBatch.com SDKを連携するには、Batch.com SDKにアトリビューションを送信する必要があります。Adjustのバックエンドからレスポンスを受け取った後に情報を送信してください。これを実行するには、ご利用のプラットフォームのアトリビューションコールバックガイドの手順に従ってください。

📖 iOS / Android

次のようなコールバックメソッドを設定できます。

Objective-C
Swift
Java
- (void)adjustAttributionChanged:(ADJAttribution *)attribution {
    // initiate Batch user editor to set new attributes
    BatchUserDataEditor *editor = [BatchUser editor];

    if (attribution.network != nil)
        [editor setAttribute:attribution.network forKey:@"adjust_network"];
    if (attribution.campaign != nil)
        [editor setAttribute:attribution.campaign forKey:@"adjust_campaign"];
    if (attribution.adgroup != nil)
        [editor setAttribute:attribution.adgroup forKey:@"adjust_adgroup"];
    if (attribution.creative != nil)
        [editor setAttribute:attribution.creative forKey:@"adjust_creative"];

    // send new attributes to Batch servers
    [editor save];
}