We’re pleased to announce that version 1.2 of the Ad Exchange Buyer REST API is now available. This release provides one of the most requested features— detailed creative disapproval reasons. Additionally, it also provides a new field for creatives that can be used to identify the agency providing the creative and a new field for direct deals that can be used to determine whether a deal originated from a private auction. You may view a more specific listing of the changes implemented in v1.2 in our release notes.
The Creatives resource now has an improved disapprovalReasons field. Previously, this field provided a list of strings that described the reason for disapproval in a broad context that may have been somewhat ambiguous. Each element of disapprovalReasons now provides two additional fields— reason and details. One can use disapprovalReasons.reason in order to access a categorized reason for disapproval, or use disapprovalReasons.details to retrieve a list of strings describing the disapproval reason in detail.
disapprovalReasons
reason
details
disapprovalReasons.reason
disapprovalReasons.details
Publishers now have greater control over their inventory— e.g. with the new inventory management system, they may set rules that could offer special pricing or limit access to a specific set of creative agencies. With the new agencyId field, you can identify the creative agency that produced the ad with one of the IDs listed in agencies.txt, and consequently gain access to publisher inventory that utilizes these features.
agencyId
We’ve given publishers the ability to create private auction deals, which you can read more about in our help center. You can now determine whether you have a fixed price deal or private auction deal by checking the private_exchange_min_cpm field— if it is set instead of the fixed_cpm field, you have a private auction deal. When you bid on ad slots from the publisher offering this deal, you are expected to offer at least the amount provided by this field.
private_exchange_min_cpm
fixed_cpm
You can read more about the new features in the Buyer REST v1.2 documentation. As always, we welcome you to join us on our forum to discuss and ask questions about these changes. To keep informed on all of our ads-related technologies, follow our Google Ads Developers Google+ page.
- Mark Saniscalchi, Ad Exchange Buyer Team
Device
TABLET
HIGH_END_MOBILE
DESKTOP
The sunset of DFA API version v1.18 has been pushed back to April 16th, 2013. This version of the API has been deprecated since November, 2012 and was previously scheduled to be retired on February 28th, 2013.
If you’re still using v1.18, please be sure to update your applications before April 16th. Our release notes will help you identify differences in v1.19, the most important one being the necessity to use HTTPS connections. We are available on our forum to help you with any questions you have.
Ad networks take into account a variety of signals when targeting ads to your users. Generally speaking, the more information you provide to an ad network, the more accurately that network can target its ads, and the better those ads perform.
Many parameters, such as age, gender, and location, are commonly used by most ad networks. AdMob Mediation supports passing those parameters directly in the AdRequest; these parameters will be passed to the networks you’re mediating:
AdRequest
AdRequest adRequest = new AdRequest(); adRequest.addTestDevice(AdRequest.TEST_EMULATOR); adRequest.setBirthday(new Date(2000, 1, 1)); adRequest.setGender(AdRequest.Gender.MALE); adRequest.setLocation(location);
AdMob Mediation also supports passing specialized parameters to specific networks. Any custom parameters used by a specific ad network can be passed to an instance of that network adapter’s NetworkExtras object, which is then set on the AdRequest. Here is how you can customize the background and text colors for AdMob text ads, and set education level and number of children for a hypothetical Example ad network:
NetworkExtras
AdMobAdapterExtras adMobExtras = new AdMobAdapterExtras(); adMobExtras.addExtra("color_bg", "00FFFF"); adMobExtras.addExtra("color_text", "FF0000"); adRequest.setNetworkExtras(adMobExtras); ExampleAdapterExtras exampleExtras = new ExampleAdapterExtras(); exampleExtras.setEducation(Education.BACHELORS); exampleExtras.setNumberOfChildren(2); adRequest.setNetworkExtras(exampleExtras);
AdMob Mediation will pass an adapter only the NetworkExtras object specific to that network. So in this case, the AdMob adapter will be provided with the AdMobAdapterExtras object, and the Example adapter will be provided with the ExampleAdapterExtras object. You can find the class name for each ad network’s NetworkExtras object in their respective adapter jar file.
AdMobAdapterExtras
ExampleAdapterExtras
You can also use CustomEventExtras to pass special parameters to any custom events that your app implements. Keep in mind that you can call AdRequest.setNetworkExtras() with only one instance of CustomEventExtras for all custom events that you implement. To make sure your custom event doesn’t access parameters meant for other custom events, we recommend you create a HashMap for each custom event, and pass in any necessary key-value pairs related to that custom event in that map.
CustomEventExtras
AdRequest.setNetworkExtras()
HashMap
CustomEventExtras customEventExtras = new CustomEventExtras(); HashMap customExtras1 = new HashMap(); customExtras1.put("key1", "value1"); customExtras1.put("key2", "value2"); customEventExtras.addExtra("customEvent1", customExtras1); HashMap customExtras2 = new HashMap(); customExtras1.put("key1", "othervalue1"); customExtras1.put("key2", "othervalue2"); customEventExtras.addExtra("customEvent2", customExtras2);
Your custom event implementation just needs to check CustomEventExtras for the HashMap at whatever key that was designated for it - in this case customEvent1. You’ll use these parameters to construct your custom event.
HashMap extras = (HashMap) customEventExtras.getExtra("customEvent1");
Once you’re done setting all targeting options, make sure to call loadAd with that request.
loadAd
// This snippet assumes you have an AdView object named "adView". adView.loadAd(adRequest);
If you have any questions or comments about AdMob, mediation, custom events, or targeting, we can field them in the forum. Also follow us on our Google+ page for ads-related updates.
- Eric Leichtenschlag, AdMob Team