Posted:
Starting June 2015, AdWords will no longer support WAP mobile ads for devices without a full-featured browser, including feature phones. At that time, the AdWords API will no longer support creation of new MobileAds or MobileImageAds. Any remaining ads with these types will stop serving and be converted into DeprecatedAds with status REMOVED. These changes will be visible in all supported versions of the API, though the DeprecatedAd.type field may be UNKNOWN until it can be added to the WSDL in a subsequent API release.

Historical performance metrics for any removed ads will still be available for download via the API’s AD_PERFORMANCE_REPORT.

Next steps
To reach the broadest set of mobile users with your campaigns, we recommend that you:
  • Recreate your ad in a non-WAP mobile ad format: Once you've created your ad in one of our new mobile-specific formats, you can drive more mobile traffic to your ads by setting mobile-specific bid adjustments. If you'd like to keep a copy of your original WAP mobile ads and their performance metrics, we recommend that you download reports for your original WAP mobile ad groups before June 1, 2015.
  • For Display Network-only campaigns: You can create mobile-preferred ads to target specific mobile platforms and mobile carriers for a campaign.
Still have questions? Feel free to visit us on the AdWords API Forum or our Google+ page.

Posted:
Update: Corrected enumeration value in the post to "CALLS".

Starting the week of September 29, 2014, we’re changing the way we report mobile click-to-call data in AdWords API reports.

Currently, when you download a CAMPAIGN_PERFORMANCE_REPORT or ADGROUP_PERFORMANCE_REPORT with ClickType segmentation, mobile click-to-call data is reported as two separate click types:
  • A row with ClickType = CALLS contains all the stats related to clicks, like Clicks, Impressions, Cost, etc.
  • A row with ClickType = MOBILE_CALL_TRACKING contains all the corresponding stats related to phone calls, like NumOfflineInteractions, NumOfflineImpressions etc, OfflineInteractionCost, etc.
Based on your feedback, we will combine these two click types into a single click type starting the week of September 29, 2014. The combined data will now show up on a single row: ClickType = CALLS. As a result, you’ll no longer receive data for ClickType = MOBILE_CALL_TRACKING. This change will impact existing mobile click-to-call data, including historical performance.

If your applications use these report types to process mobile click-to-call data, make sure they account for this new data format. If you have questions or comments, let us know on our developer forum. You can also follow our Google+ page for updates about the AdWords API.

Posted:

Imagine for a moment that you're a mobile line item. You've just been initialized locally, and all of a sudden you’re having an existential crisis -- what makes you, you? How are you different from all the other line items? Sure your associated creative might be a bit different from other line items and you might have a few extra impressions allotted to your goal, but what truly makes you... unique? In this series of posts, we'll take you on an incredible journey through a day in the life of a mobile line item -- from how to target mobile to the actual delivery on a device.

Adding mobile specific targeting

It all starts similarly enough: you need a name, an order ID, start and end dates, a goal, and all the usual suspects -- but wait, there's more! Instead of just having custom criteria, ad units, and geo-targeting, you find that you also have TechnologyTargeting fields specified, like:

  • DeviceCategoryTargeting
  • OperatingSystemTargeting
  • MobileCarrierTargeting

Now, say you're being created as a line item to advertise Android tablet cases. It doesn't make much sense for you to be delivered to an iPad or an iPhone, so we need to add technology specific targeting.

To do so using Java, we would first set the DeviceCategory object with the targeting ID of the 'Tablet' category and the OperatingSystem object with the targeting ID of 'Android', both of which we'd pull from the PublisherQueryLanguage service:

    DeviceCategory deviceCategory = new DeviceCategory();
    OperatingSystem operatingSystem = new OperatingSystem();

    deviceCategory.setId(30002L);
    operatingSystem.setId(501013L);

These would then be set on the DeviceCategoryTargeting and OperatingSystemTargeting objects:

    DeviceCategoryTargeting deviceCategoryTargeting = new DeviceCategoryTargeting();
    OperatingSystemTargeting operatingSystemTargeting = new OperatingSystemTargeting();

    deviceCategoryTargeting.setTargetedDeviceCategories(new DeviceCategory[] {deviceCategory});
    operatingSystemTargeting.setOperatingSystems(new OperatingSystem[] {operatingSystem});

Finally, the Targeting object will have a TechnologyTargeting object set for DeviceCategoryTargeting and also OperatingSystemTargeting:

    TechnologyTargeting techTargeting = new TechnologyTargeting();
    technologyTargeting.setDeviceCategoryTargeting(deviceCategoryTargeting);
    technologyTargeting.setOperatingSystemTargeting(operatingSystemTargeting);

    Targeting targeting = new Targeting();
    targeting.setTechnologyTargeting(techTargeting);

Now what happens? You're a line item that has a bit of technology targeting specified, but where are you off to next? Stay tuned for what happens next in - 'A day in the life of a mobile line item, part 2.'

Posted:
Editor's note: re post from Inside AdSense blog. --Stan Grinberg

As the holidays approach, you can expect an increase in smartphone usage, especially in activity with gaming apps. Each year around this time, millions of new mobile devices are activated and billions of apps are downloaded. A recent AdMob study* also revealed that downloading and playing gaming apps are users’ top priority when getting a new smartphone, which represents a special opportunity for developers.

A new strategy for game-app developers can help them make the most of this increase in usage. Game developer Izumi Artisan used this strategy to increase his revenue by 60%, and so today we’ll share the details on how he achieved these results.


Step 1) Create a strategy guide for your game and post it on your website
Game guides, strategy manuals, and walk-throughs have become commonplace for gamers looking to get the edge or just take the easy path through a tricky section of a game. As a result, numerous third party game-strategy sites have popped up, and are attracting users in mass numbers.

This represents a great opportunity for you as a game developer, as you can create your own strategy or walk-through guide and host it on your website. There are many examples of successful game guides on the Web that you can use as a model when creating your own. The guides will vary in structure and length depending on the format of the game, so we suggest browsing a few to find the most suitable format. If there are already third-party guides competing for your users’ attention, try releasing the “Official” guide to separate yourself from the rest of the pack.

Step 2) Monetize your new website with AdSense
Creating great content and putting it on the Web is an important step for those looking to generate income online. To start earning revenue from your online content you can use AdSense to show highly relevant ads on your website.

With AdSense, advertisers will bid against each other to show their ads next to your content. The ads that appear are highly targeted, so they’re likely to be interesting to your visitors. AdSense also offers a number of great features including customization options to control the appearance, placement and type of ads that will show up on your site, as well as the ability to restrict the subject matter of the ads.

If you’re not already an AdSense publisher, sign up for a free AdSense account.

Step 3) Use house ads in AdMob to drive users to your new website
One of the most difficult pieces of building a successful website is attracting visitors. As a game developer, you have the benefit of an existing and engaged audience -- your users. By taking advantage of this built-in audience you can quickly generate demand for your new web content...you just have to point them in the right direction.

You can do this by using AdMob’s house ad feature, which lets you display your own promotions to your users at no cost. By creating a “house ad” promotion for your new website and displaying it in an appropriate section of your game (i.e., on the home screen, or in-between game play, etc.), you can easily generate awareness for your web content while preserving a good experience for your users. The great part is, you won’t need to push a new version of your app since the house ad can be updated directly within the AdMob interface.


Sign up for an AdMob account here. It’s free.

Be sure to make the most of the app usage increase that comes with the holiday season by trying this strategy. Have these tips worked for you? Do you have other tips to share? Let us know in the comments!




*Mobile Apps Consumer Study, AdMob and Parks Associates, Oct 2013

Posted:

Are you a student who loves to code or has a great idea for a mobile app? Maybe you’re building one right now. Imagine that one day your app could be seen by millions of users.

You’re invited to take part in The AdMob Student App Challenge, a mobile app contest open exclusively to students around the world. The goal is to build a great app (either Android or iOS), create a revenue stream using AdMob's in-app advertising, and tell us about your experience in a written business report. You can either build the app on your own or form a team of up to five students.

To win the Challenge, you'll need a great app and a good business strategy that focuses on how you manage the project, gain users and leverage AdMob. In the next few weeks we’ll be announcing the respected app industry leaders who’ll be on the judging panel.

We’ve got some awesome prizes if you win: The winning team will receive:

  • A 7-night trip to San Francisco with spending money, including a trip to the Google headquarters in Mountain View.
  • The winning app will be featured on the Google Play store and on the Play Store's social channels (certain conditions apply).*
  • An opportunity to star in your own case study video to tell your story.
  • A Nexus 7 device for each team member.

As well as one overall winner, there'll be a winner from each of the four global regions (North America, Latin America, Europe, Middle East & Africa, and Asia Pacific), who'll receive computing devices and an honorary mention on the AdMob website.

The Challenge starts today and you have until March 31, 2014 to build a winning app. Visit the AdMob website to learn more and to register. The winners will be announced in May 2014.

Follow the AdMob G+ page for regular updates and announcements.

Posted by Mike Schipper, Product Marketing, AdMob

*Only apps made available through the Play Store will have an opportunity to be featured. See the Official Rules for more details.

Posted:

The new Google Mobile Ads SDK for Android is now included as part of Google Play services 4.0.

As an Android developer, you’re probably familiar with Google Play services, a unified platform which makes it easy to integrate Google features into your Android apps, delivered through the Play Store and updated at regular intervals. Now that AdMob is part of the package, benefits include:

  • Seamless auto-updates: Changes to the Google Mobile Ads SDK for Android get pushed seamlessly to users through Google Play services. For most SDK updates you don’t need to update your apps each time it changes, saving you development time.
  • Take advantage of Google services: Implement features easily into your apps, such as Google Maps, Google Wallet and the Location API.
  • Better for users: Android users are saved the hassle of managing updates to multiple apps, because improvements can be received automatically in the background.

This new version of Google Play services supports devices running Android 2.3 and higher. We recommend updating your apps right away to make ongoing maintenance of your apps easier. Even if you develop for Android devices that don’t receive Google Play services, the Google Mobile Ads SDK is still compatible with those devices, the difference is that users won’t receive automatic updates. Also, please note, the SDK doesn’t currently support DFP, Ad Exchange or Search Ads for Mobile Apps but support is coming soon.

You can find the new SDK in the SDK Manager; follow these instructions to get it, and find the release notes here. If you have questions about it please post to the forum or check out our G+ page.

Posted by Vishay Nihalani, Product Manager, AdMob

Posted:
Today, we’re excited to announce the launch of a beta version of the AdMob SDK for Windows Phone 8 to help you monetize your Windows Phone 8 applications! The key features of this SDK include the ability to:
  • Create an AdMob banner view from code
  • Embed an AdMob banner directly in an XAML file
  • Show full-screen interstitial ads
  • Register for ad events such as succeeding or failing to receive an ad
This beta version of the SDK does not include the following features that are available on iOS and Android:
  • Ad Network Mediation
  • Support for DoubleClick for Publishers
  • Search Ads for Mobile Apps support
  • MRAID support
It should also be noted that Windows RT is not supported at this time.

You can get the Windows Phone 8 SDK from our downloads page, and check out the getting started guide for developer instructions. To register an ad unit, you’ll need to have upgraded to the new AdMob. Any questions can be directed to our developer forum, and be sure to stay tuned on the Google Ads Developers Plus page for news on all Google Ads developer products.

Posted:
Editor's note: repost from the DoubleClick Publisher Blog --Stan Grinberg

With every new plot planted and zombie zapped to bits, the online games industry is changing the way we interact with entertainment. Online games publishers work with us to grow their gaming empires across all screens, from distribution and downloads through to in-game advertising. We’ve also recognized a growing advertiser demand to reach highly engaged games audiences. So we were especially excited to announce two launches at Europe’s Game Developer Conference: we’re launching the TrueView video ad format across our games monetization platforms, and opening up the DoubleClick Ad Exchange to monetize desktop games.

TrueView creates a better ad experience for gamers, and higher monetization for publishers

We all know how important it is to create a gamer-friendly ad experience, which is why we’re bringing one of our most successful ad formats to games: the skippable video ad. TrueView Instream skippable video ads drive a lot of advertiser demand on YouTube, the Ad Exchange, and AdSense for video. Following on Susan Wojcicki’s beta announcement earlier this year, we’re now making TrueView video ads available to all games publishers on AdX, AdSense for games, and select mobile publishers on AdMob. During the beta, we found that TrueView video ads contributed to lower abandonment rates and greater monetization compared to normal instream video ads.

The Ad Exchange posts a new high score with desktop in-game ads

Programmatic channels have revolutionized the way we buy and sell online advertising - and now the launch of in-game ads on the Ad Exchange gives developers the same sophisticated platform to accelerate their monetization efforts. Publishers who have desktop Flash and HTML5 games can now access the global advertiser demand, top-performing ad formats, and finely-tuned controls offered by the Ad Exchange. Advertisers can now specifically target online games’ highly engaged audiences with wide range of gamer-friendly ad formats. These include image and text overlays and interstitials, right through to standard video ads and the skippable TrueView video ad format.

We think that opening the programmatic channel and the rise of gamer-friendly ad formats like TrueView will drive even better monetization for games - which is great news for game publishers, but perhaps not for the zombies.

Posted:

Unity is a game development framework that makes it very easy to develop games for mobile platforms. Today we're releasing a plugin to help developers show AdMob banner ads in Unity games developed for iOS and Android. This plugin is packaged as a Unity Package so integration with a Unity project should be very easy. The included README has a step-by-step walkthrough on getting started.

We remind developers to follow AdMob best practices when integrating ads into their games. In particular, we advise that you put ads on screens only where they won’t cause a dip in your app’s frame rate.

You can check out the AdMob Unity plugin on our samples page (Android | iOS). Please direct any questions or general feedback to our forum. You can also follow our Google+ page to stay up to date on all of Google's ads products.


Posted:

We have just released version 6.4.1 of the Google AdMob SDK for both Android and iOS. The Android release includes:

  • The ability to resize a DfpAdView using dfpAdView.resize(AdSize)
  • A fix for the ANR errors seen in v6.3

The iOS release fixes a crash that occurs if the Advertising Identifier is nil.

You can get the latest SDKs from our downloads page. Find us on the forum if have questions about the new Google AdMob SDKs. You can also check out our Google+ page for ads-related updates.

Posted:

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 = 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:

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.

Custom Events

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 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");

Load the Ad

Once you’re done setting all targeting options, make sure to call loadAd with that request.

// 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.

Posted:
Smartphones and tablets can be great creative canvases for brand advertisers, and many agencies are helping brands go big on mobile. But it’s hard for agencies and advertisers to experience the full interactivity of mobile rich media -- mobile video and HTML5 ads --  through static images alone. Last night at our annual Creative Sandbox event in New York, we unveiled the new Mobile Ads Showcase App, which lets you experience mobile ads exactly as your users will.

The app lets you explore what best-in-class advertisers are doing with mobile rich media, and learn about all that’s possible with Google Mobile Ads. Additionally, agencies can use the app as their mobile portfolio by coding, testing and uploading their HTML5 ad examples to the MRAID-compliant “My Ads” screen. The app is now available for Android smartphones and tablets through the Google Play Store.

See the app in action and learn more about how it works on the Creative Sandbox site.



Posted:

There are a number of ways interstitials can be incorporated into applications that play video. One common integration we’ve seen is displaying the interstitial right before a video is played. This blog post will show you how to do this on iOS.


Set Up Your Video Player

For this specific example, we’re going to use MPMoviePlayerController. This class makes it easy to integrate video playback into your iOS application. However, make sure not to use MPMoviePlayerViewController as we want to have control over our own view controller.

- (void)viewDidLoad {
  [super viewDidLoad];
  NSURL *bundleURL = [[NSBundle mainBundle] bundleURL];
  NSURL *movieURL = [bundleURL URLByAppendingPathComponent:@"Video_Name_Here.mp4"];
  player_ = [[MPMoviePlayerController alloc] initWithContentURL: movieURL];
  //  Don’t add the player_ into the view hierarchy yet
  [player_.view setFrame:self.view.bounds];  // player's frame must match parent's
  player_.controlStyle = MPMovieControlStyleFullscreen;
  [[NSNotificationCenter defaultCenter]
    addObserver:self
    selector:@selector(moviePlayerPlaybackDidFinish:)
    name:MPMoviePlayerPlaybackDidFinishNotification
    object:player_];
}

We add an observer at this point to tell us when the movie is done playing. This is typically when our view controller will transition away from the MPMoviePlayerController’s view.


Set Up Your Interstitial

Set up a GADInterstitial object as you normally would and and call loadRequest: at an appropriate time in your application flow. Present the interstitial once it comes back.

- (IBAction)showMovieInterstitial:(id)sender {
  self.interstitial = [[[GADInterstitial alloc] init] autorelease];
  self.interstitial.delegate = self;
  self.interstitial.adUnitID = @”YOUR_IDENTIFIER_HERE”;
  [self.interstitial loadRequest: [GADRequest request]];
}

- (void)interstitialDidReceiveAd:(GADInterstitial *)interstitial {
  [interstitial presentFromRootViewController:self];
}

The trick here is that after you receive and present your interstitial, you’re going to have to add your MPMoviePlayerController’s view into your view hierarchy. You want to make this look seamless so that as the interstitial is dismissed, the movie player looks as though it is in the background. This means making the view hierarchy change in interstitialWillDismissScreen: (called before the interstitial is dismissed).

- (void)interstitialWillDismissScreen:(GADInterstitial *)interstitial {
  [self.view addSubview:player_.view];
}

If you’re auto-playing the video, you don’t want to start playing in interstitialWillDismissScreen: as the user will miss a part of the video when the dismissal transition happens. Instead, you can play the movie in interstitialDidDismissScreen:.

- (void)interstitialDidDismissScreen:(GADInterstitial *)interstitial {
    [player_ play];
}

Remember that you have to unregister for notifications when you are cleaning up your MPMoviePlayerController as well.

- (void)dealloc {
  if (player_) {
   [[NSNotificationCenter defaultCenter]
     removeObserver:self
     name:MPMoviePlayerPlaybackDidFinishNotification
     object:player_];
    [player_.view removeFromSuperview];
    [player_ release];
    player_ = nil;
  }
  interstitial_.delegate = nil;
  [interstitial_ release];
  [super dealloc];
}

Let us know on the forum if you have any questions about interstitials specifically or the Google AdMob SDK in general. You can also follow us on our plus page for AdMob-related updates.



Posted:

App Events, a feature introduced in v6.1.0 of the AdMob SDK, provides DFP developers the ability to create ads that can send messages to their application code. The application can listen for and react to these messages by executing custom code.

This powerful feature lets you do some pretty cool things, such as sending the entire creative code to the app, or telling the app what ad is running. In this example, we’ll show how the app can change background colors when it receives an app event.

The first step is to set up your creative in DFP. The sample below is a 320x50 creative which sends a color=red event when the ad is first displayed, and a color=green event when the ad is clicked.

<html>
<head>
  <script src="//media.admob.com/api/v1/google_mobile_app_ads.js"></script>
  <script>
    // Send a color=red event when ad loads.
    admob.events.dispatchAppEvent("color", "red");
    
    handleClick = function() {
      // Send a color=green event when ad is clicked.
      admob.events.dispatchAppEvent("color", "green");
    };
  </script>
  <style>
    #ad {
      width: 320px;
      height: 50px;
      top: 0px;
      left: 0px;
      font-size: 24pt;
      font-weight: bold;
      position: absolute;
      background: green;
      color: red;
      text-align: center;
    }
  </style>
</head>
<body>
  <div id="ad" onClick="handleClick()">Happy Holidays!</div>
</body>
</html>

The creative above references the AdMob API for Ads JavaScript, and calls admob.events.dispatchAppEvent to send app events. You can check out an example of the creative below, and view the developer console to see logging statements when the app events are being fired.


The next step is to have the application code listen for these app events. Here are the iOS and Android versions of this method, respectively:

// iOS
- (void)adView:(DFPBannerView *)banner
    didReceiveAppEvent:(NSString *)name
    withInfo:(NSString *)info {
  NSLog(@"Received app event (%@, %@)", name, info);
  // Checking for a "color" event name with information being a color.
  if ([name isEqualToString:@"color"]) {
    if ([info isEqualToString:@"red"]) {
      self.view.backgroundColor = [UIColor redColor];
    } else if ([info isEqualToString:@"green"]) {
      self.view.backgroundColor = [UIColor greenColor];
    }
  }
}

// Android
@Override
public void onAppEvent(Ad ad, String name, String info) {
  String message = String.format("Received app event (%s, %s)", name, info);
  Log.d(LOG_TAG, message);
  if ("color".equals(name)) {
    LinearLayout layout = (LinearLayout) findViewById(R.id.mainLayout);
    if ("red".equals(info)) {
      layout.setBackgroundColor(Color.RED);
    } else if ("green".equals(info)) {
      layout.setBackgroundColor(Color.GREEN);
    }
  }
}

Remember to register this callback on the banner view:

// iOS
[bannerView_ setAppEventDelegate:self];

// Android
adView.setAppEventListener(this);

That’s it! If you load this ad into your banner view, your application will change its background color to red when the ad is loaded, and green when the ad is clicked. This example can be extended to change the implementation of the app event listener or to fire app events at any point during the creative’s lifecycle.

Let us know on the forum if you have any questions about app events specifically or the Google AdMob SDK in general. You can also follow us on our plus page for AdMob-related updates.

Edit: Fixed plus page link.

Posted:

Recently, we started cautioning publishers against using GADInterstitial’s loadAndDisplayRequest:usingWindow:initialImage: method with mediation. We saw some odd behavior occurring when publishers used that method. This blog post outlines a way to implement the functionality of this method while avoiding the problems that had been associated with it.

The original method replaced the rootViewController of the window temporarily while the splash image was being shown. Since you have control of your view controllers as the publisher, this step is unnecessary. Assuming you want to show the splash image on app startup, you can place your interstitial code in your rootViewController’s viewDidLoad: method. This method is called after the view hierarchy is loaded into memory.

On a high level, all you need to do is initialize a UIImageView and add it into your view hierarchy in the viewDidLoad: method. To be extra careful, you may also want to hide the status bar while your splash image is being shown.

- (void)viewDidLoad {
  [super viewDidLoad];

  interstitial_ = [[GADInterstitial alloc] init];
  interstitial_.adUnitID = @"MY_INTERSTITIAL_ID";
  interstitial_.delegate = self;

  // Remember whether the status bar was hidden or not.
  hideStatusBar_ = [UIApplication sharedApplication].statusBarHidden;
  [UIApplication sharedApplication].statusBarHidden = YES;
  
  GADRequest *request = [GADRequest request];
  request.testing = YES;
  [interstitial_ loadRequest:request];

  // Initialize your splash image and add it to the view.
  imageView_ = [[UIImageView alloc] initWithImage:[UIImage  imageNamed:@"InitialImage"]];
  [self.view addSubview:imageView_];
}

If you only want to show the splash image and interstitial the first time the app is loaded, you can write a boolean into NSUserDefaults and check that boolean before you present the interstitial in viewDidLoad:.

As a final step, you must remove the imageView_ from the view hierarchy once the interstitial comes in. Remember that you also need to remove it if the interstitial fails. To reduce code duplication, you can put this logic into it’s own method.

- (void)restoreController {
  [imageView_ removeFromSuperview];
  // Restore status bar to state it was before hiding.
  [UIApplication sharedApplication].statusBarHidden = hideStatusBar_;
}

#pragma mark GADInterstitialDelegate

- (void)interstitialDidReceiveAd:(GADInterstitial *)ad {
  NSLog(@"Received ad successfully");
  [interstitial_ presentFromRootViewController:self];
}

- (void)interstitial:(GADInterstitial *)ad
didFailToReceiveAdWithError:(GADRequestError *)error {
  NSLog(@"Failed to receive ad with error: %@", [error localizedFailureReason]);
  [self restoreController];
}

- (void)interstitialWillDismissScreen:(GADInterstitial *)ad {
  // Remove the imageView_ once the interstitial is dismissed.
  [self restoreController];
}

If you have any questions about the AdMob SDK, reach out to us on the forum or join us for our upcoming AdMob office hours. You can also follow us on the Google Ads Developer plus page.


Posted:
Editor’s note: "reposting from Google Mobile Ads Blog post by Morgan Hallmon." -- Stan Grinberg, Ads Developer Relations Team

Apps are a powerful way to keep your most loyal users engaged, and can also be a real driver of revenue for marketers big and small. When advertising apps, the key is to know what’s working and what’s not. While advertisers have already been able to measure their Android app downloads within AdWords, we’ve now launched the ability to track iOS downloads that were driven by in-app display ad campaigns.

To set up iOS conversion tracking, advertisers need to create a single code snippet in their AdWords account and install it in their app. This snippet is accessible in the AdWords interface in the same place where advertisers have been able to codelessly track Android downloads. With iOS conversion tracking, marketers can better understand which campaigns are most effective at driving app downloads. These enhanced insights help marketers iterate on app promotion strategies to reach their return on investment goals, with the help of features like the Conversion Optimizer for apps.

Figuring out what ads are working is key for marketers like Sho Masuda, Vice President of Player Marketing for GREE, a leading mobile social game app developer. GREE has used click to download and in-app advertising solutions with AdWords to promote their app, and Masuda says, "Google’s host of tracking and optimization tools help us quickly iterate and maximize ROI across our app promotion campaigns. iOS conversion tracking will help us gain even deeper insights into our Google app promotion efforts for our iOS apps.

If you’d like to learn more about how to track value beyond the app download, you can watch a recording of our Learn with Google webinar “Understanding your App Users with Google Analytics” here.

Posted:

Since releasing version 6.2.0 of our Android SDK on Tuesday, we have identified a high priority bug which causes apps to crash when our SDK returns certain types of ads. We’ve made a server-side fix which stops the crash-inducing ads, and are also issuing an SDK hotfix to prevent any similar issues from happening in the future.

Please download the new 6.2.1 SDK here and update your apps at your earliest convenience. And Happy Friday from AdMob!

Posted by Chrix Finne, Product Manager

Posted:

We’re excited to announce the release of the AdMob SDK v6.2.0 for Android and v6.2.1 for iOS. The iOS update is mostly a bugfix release, but now requires you to link against the StoreKit framework, which will allow us to experiment with innovative ad experiences. The Android release includes changes to DFP App Events and Custom Events that we’ll discuss below.

DFP App Events

The Android AppEventListener interface has changed slightly to include the ad that fired the app event. The new interface definition is:

public interface AppEventListener {
  void onAppEvent(Ad ad, String name, String info);
}

If you previously implemented onAppEvent(String name, String info), you’ll have to update this method signature when upgrading to v6.2.0.

Custom Events

Due to popular demand, we’ve added the ability to pass information to your custom event. We’ve also added a destroy() method so you can clean up your custom event. The new CustomEventBanner interface definition is:

public interface CustomEventBanner extends CustomEvent {
  void requestBannerAd(CustomEventBannerListener listener,
                       Activity activity,
                       String label,
                       String serverParameter,
                       AdSize size,
                       MediationAdRequest mediationAdRequest,
                       Object customEventExtra);
  void destroy();
}
The customEventExtra object is sent to your custom event by creating an instance of CustomEventExtras and passing it to the AdRequest. The following example sends the string “hello custom event” to your custom event class:
final String CUSTOM_EVENT_LABEL = “MyCustomEventLabel”;
AdRequest adRequest = new AdRequest();
CustomEventExtras extras = new CustomEventExtras();
extras.addExtra(CUSTOM_EVENT_LABEL, "hello custom event");
adRequest.setNetworkExtras(extras);

When calling CustomEventExtras.addExtra(), make sure the key is the same as the label of the custom event you defined in the AdMob UI. The AdMob SDK searches CustomEventExtras for the object corresponding to the label of the custom event, and invokes requestBannerAd on your custom event class with that object. You can call addExtra() for each custom event class you have, and AdMob Mediation will send the appropriate object to the custom event it invokes. If AdMob can’t find an object for your custom event label, it will pass null to requestBannerAd().

A destroy() method has also been added to the custom event interface so you can perform any necessary cleanup. The AdMob Mediation framework will invoke destroy() when it refreshes the AdView.

Check out the release notes for the full list of changes in this version. If you have any questions about the latest AdMob SDK, please reach out to us on the forum or join us for AdMob office hours. You can also follow us on the Google Ads Developer plus page for AdMob-related updates.

Posted:

The recently released Version 2.0 of cocos2d for iPhone deprecated the use of RootViewController in cocos2d projects. Previously, we showed you how to integrate AdMob ads by leveraging the RootViewController. Here, we show you the updated way of integrating AdMob ads into cocos2d v2.0 projects.

All of your initialization can now be done in the layer where you’d like the ad to show. In your layer’s init function, you can set up your ad banner as you would normally.

-(id) init
{
    // Do other layer initialization here.

    adBanner_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
    adBanner_.adUnitID = @"YOUR_ADMOB_PUBLISHER_ID";
    adBanner_.delegate = self;
    ….
}

The tricky part here is setting the rootViewController property for your GADBannerView and putting it into your view hierarchy. Version 2.0 of cocos2d uses a UINavigationController as its top-level view controller. The main OpenGL view is placed inside this controller. You want to set your rootViewController to be the main navigation controller.

AppController *app = (AppController*) [[UIApplication sharedApplication] delegate];
[adBanner_ setRootViewController:[app navController]];

There are performance considerations to think about when adding a GADBannerView into your hierarchy. Overlaying UIKit layers on top of OpenGL layers can lead to lower frame rates for apps that draw often. However, with newer hardware, this performance decrease is less of a concern. As always, we recommend that you profile your application’s performance to determine what works in your situation.

For our example, we will add the GADBannerView on top of the OpenGL view. This involves accessing the view being shown from the sharedDirector object.

[[CCDirector sharedDirector].view addSubview:adBanner_];

Remember that since you are creating GADBannerView objects, you will have to clean them up with dealloc as well.

- (void) dealloc {
  adBanner_.delegate = nil;
  [adBanner_ release];
  [super dealloc];
}

You should now see AdMob ads show up in your cocos2d application. If there are any other integration topics you would like to see, or any technical questions you have, please let us know about them on the forum or check out our G+ page.


Posted:

Today, we released v6.2 of the AdMob SDK for iOS developers. This release includes a number of bug fixes as well as some important changes for iOS 6 and the iPhone 5. This post will go through some important differences developers should keep in mind when working with AdMob v6.2. All of our developer docs have already been updated to reflect these change.


XCode 4.5 and iOS 6

We’ve made a number of changes to add support for both iOS 6 and the iPhone 5. This means that you will need to use XCode 4.5 and build against iOS 6 when using our SDK. You can still support down to iOS 4.3 by setting your “Deployment Target” to iOS 4.3 in your project’s Application Target.




Support for armv7s

The iPhone 5 is powered by the A6 processor which uses the armv7s architecture, so targeting armv7s will optimize your app to run on iPhone 5. We’ve dropped support for the armv6 architecture and added support for the armv7s architecture in this release (we also still support armv7). New projects created via XCode 4.5 default to supporting armv7 and armv7s, meaning that this shouldn’t be an issue as long as you’re using the correct version of XCode.

If you’re targeting the armv7s architecture, you will not need to add the -all_load linker flag to your projects anymore. If you were using this specifically for AdMob, you can now safely remove the flag from the “Other Linker Flags” section of your project’s “Build Settings”. You will still need to have the -ObjC linker flag in this section.


Identifier for Advertising

We are now also using Apple’s Identifier for Advertising for personalization and reporting. You will have to link against the AdSupport framework in your applications when using the AdMob SDK in order to support this feature. You can do this by adding the AdSupport.framework to the “Linked Framework and Libraries” section of your application’s Target settings. Make sure that you link the framework using the “Optional” setting if your application can run on an iOS version below iOS 6.


Auto Layout Support

Apple introduced Auto Layout for iOS 6 to help support multiple screen sizes. All of our AdMob banners have been updated to work with Auto Layout. When using Auto Layout (in code) with a GADBannerView, you must:

  • Remember to set the translatesAutoresizingMaskIntoConstraints property on the GADBannerView to NO
  • Make sure the GADBannerView’s frame is big enough to receive the ad type requested

We will release some sample code showcasing best practices when using Auto Layout very soon.

You can download the latest SDKs from our downloads page. If you’ve got any other questions or concerns about using the new AdMob SDK, please ask us in the forum or check out our G+ page.