Batch.com SDK integration

You can integrate the Adjust SDK with Batch.com events by following one of the methods below.

Before you begin

To use this feature, you first need to download and set up the Adjust SDK for your platform. Follow the instructions linked below to get started.

⚙️ iOS / Android

To integrate Adjust with the Batch.com SDK, you need to send attribution to the Batch.com SDK. You should send this information after receiving a response from the Adjust backend. To do this, follow the steps in the attribution callback guide for your platform:

📖 iOS / Android

Examples

You can set the callback method like this:

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];
}