The official blog for information about the Google Ads, Google Ad Manager, Google Mobile Ads SDKs for AdMob and IMA SDKs, and other Google Advertising Platform developer tools.
The Mobile Ads Garage is a new series that covers how to use the Mobile Ads SDK to display ads from AdMob and Doubleclick For Publishers. Each episode will cover one aspect of the SDK, break down the feature, and show screencasts of real implementations on both Android and iOS – all in a friendly format.
We’d love to hear which AdMob features you’d like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.
As you can see, we're still missing a couple pieces of the puzzle. How do you programmatically load the preview URLs in a browser and get the measurements we want? What measurements do we want?
The first question has a straightforward answer: WebDriver. You can load the preview URL with the browser automation tool. It can take screenshots, click on elements, and extract information from a web page.
When it comes to what metrics you want to collect, it's entirely up to you. Modern browsers log a wealth of information about page performance and network timing. ChromeDriver even has an extension that sends these performance logs back to your WebDriver application in the form of logs. Using these logs you can get whatever metrics are important to you, including page load or network events.
If the performance logs are too granular, you can leverage existing tooling instead. The Google Publisher Console is great for investigating and debugging a creative's performance. Just append a URL parameter and you get access to a debugging console by pressing Ctrl+F10 (⌘+F10 on Mac).
Both of these can be done through WebDriver. Add the same URL parameter when you create an in-site preview URL (the one you create with the LineItemCreativeAssociationService) and send the key presses through WebDriver.
Let's see it in action. To test this, create a blank test page and tag it. Then use the API to get any new creatives and associate them with a test line item. Finally, use the LineItemCreativeAssociation service to get a preview URL for WebDriver.
The implementation details are up to you, but when you mix the DFP API with a browser automation tool like WebDriver, it opens up a world of testing possibilities.
If you like the video, save the Mobile Ads Garage playlist to your YouTube Playlist collection and you'll never miss an episode.
We’d love to hear which AdMob features you’d like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.