ATS Direct for Mobile SDK
Learn how you can implement ATS Direct with ATS Mobile SDK
ATS Direct enables publishers to offer their authenticated inventory directly to their marketer partner. You can implement ATS Direct with ATS Mobile SDK to create direct deals on the RampIDs inventory with brand partners of your choosing.
An ATS Direct workflow consists of the following:
- You and a marketer negotiate the terms of the deal outside of Console.
- You create an ATS Direct configuration in Console.
- Marketer transfers their segments from LiveRamp Connect to your ATS Direct configuration.
- You approve the deal in Console to activate the segments.
- You create a line item in Google Ad Manager (GAM) with custom targeting set up using the value of the Deal ID (Segment ID for the marketer).
- You retrieve matching segments through the ATS Mobile SDK when a user authenticates.
- You insert the matched segments in your ad requests using custom targeting.
Requirements
To be able to call the ATS Direct API, you must have the following:
- An ATS configuration linked to an approved placement that includes the bundle IDs of your app. To find your ATS placements, log in to Console, and select Placements in the navigation menu. See Create an ATS Placement to learn more.
- ATS Direct added to your subscription in Console. Talk to a LiveRamp representative to get this set up for you.
1. Create an ATS Direct Configuration
In Console, publishers are required to create an ATS Direct configuration which is represented as a destination under “ATS Direct” in LiveRamp Connect. Marketers can then select the publisher destination to transfer their segments as RampId’s.
You can only have one ATS Direct configuration per region. The New button on the Deals page will be disabled if you already have an ATS Direct configuration for EU and US.
- Log in to Console.
- Select the ATS > Deals.
- The ATS Direct Configurations table is displayed. Click New.
- Enter a configuration name.
- Select the desired placement to tie the configuration to.
- Select the region for the ATS Direct configuration.
- Click Create.
2. Approve Deal in Console
When a marketer has transferred their segment to ATS Direct, you can approve or reject them as a ‘deal’ in Console. All transferred deals will be in Pending status by default. This means the segments will not be activated yet until it has been approved. You can also cancel a deal to stop segments from being distributed.
To learn how to manage deals in Console, see Working with Deals.
3. Create a Line Item in GAM with Custom Targeting
In Google Ad Manager (GAM), you must set up the key-value for ATS Direct, and have a line item with custom targeting set up. LiveRamp recommends using the key name of atsd. To learn the complete steps, see Configuring Google Manager.
4. Retrieve ATS Envelopes
After approving the deal in Console, you can initialize the SDK and retrieve envelopes using getEnvelope () as you normally would. If you haven't implemented ATS Mobile SDK yet, see the guides below:
To learn more about the getEnvelope method, see getEnvelope (iOS) or getEnvelope (Android).
5. Retrieve Matched Segments From the Envelope
In the callback response for getEnvelope, check the envelope object for envelope26 which contains an encoded string of matched segments. You can then retrieve a list or an array of segments using the getAtsDirectSegments method below:
if let atsdEncodedKeyValues: String = result?.envelope26 {
let atsdDecodedKeyValues = result?.atsDirectSegments // A [String] of values
}
if (envelope.getEnvelope26() != null) {
atsdKeyValues = envelope.getAtsDirectSegments(); // A comma separated string of values
}
6. Set Up ATS Direct Key-Value Targeting in GAM
Modify your GAM ad request object to correctly target the segments and present the user with relevant ads. :
let request = GAMRequest()
... // other things with your ad request
request.customTargeting = ["atsd" : atsdDecodedKeyValues.joined(separator: ",")];
// .. other logic here
bannerView.load(request)
AdManagerAdRequest adRequest = new AdManagerAdRequest.Builder()
... // other things with your ad request
.addCustomTargeting("atsd", atsdKeyValues).build();
// .. other logic here
adView.loadAd(adRequest);
Make sure to call
resetSDKwhenever a user logs out.
Updated over 1 year ago