Tag Archives: DoubleClick

A note on ad size and mediating smart banners

Smart banners are a handy thing for publishers. You can drop an AdMob smart banner into a layout or storyboard, and it’ll stretch or squeeze itself at runtime until it’s just the right size for the device, then request an ad to match. They’re a great feature with all the extra work hidden under the hood.

If you’re building an Android mediation adapter or custom event, though, things aren’t quite as simple -- after all, you’re under that hood, too! A common rough spot for developers is retrieving a smart banner’s size. Because the Google Mobile Ads SDK uses constants to internally represent a smart banner’s height and width, the getHeight and getWidth methods of a smart banner’s AdSize will return those constants (they’re negative numbers, so they’re quite hard to miss). That means relying on calls to getHeight and getWidth to determine a smart banner’s true size isn’t a workable strategy.

So how should adapter and custom event developers calculate sizes correctly? By avoiding getHeight and getWidth, and instead asking for pixel counts using getHeightInPixels and getWidthInPixels, two other methods offered by AdSize. You can scale their return values according to the device’s metrics and end up with the same kind of DPI values returned by getWidth and getHeight for other ad sizes. Here’s a code snippet that shows how it’s done:


// Get the raw pixel counts.
int widthInPixels = size.getWidthInPixels(context);
int heightInPixels = size.getHeightInPixels(context);

// These metrics include screen density, which is what we’re after.
DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics();

// These are values you can send to your mediated network’s SDK.
int widthInDpi = Math.round(widthInPixels / displayMetrics.density);
int heightInDpi = Math.round(heightInPixels / displayMetrics.density);

Once you finish the math, you’ll have proper DPI values that can be sent to whichever network you’re mediating. The calls to getHeightInPixels and getWidthInPixels require a valid Context, but you can use the one provided as a parameter to the requestBannerAd methods in MediationBannerAdapter and CustomEventBanner.

Now you know the best way to gauge the size of a smart banner! Use this approach and it’ll help keep your mediation running smoothly.

If you have technical questions about this (or anything else relating to the Google Mobile Ads SDK) stop by our forum.

Boost your business with a Certified Publishing Partner

Today we’re excited to launch our new Certified Publishing Partner program.

Certified Publishing Partners are trained experts on AdSense, DoubleClick for Publishers, and DoubleClick Ad Exchange who could help you earn more from your sites while also saving you time. Whether you’re just starting out with ads, fine-tuning your existing ad setup or looking for brand new revenue sources, Certified Publishing Partners are ready to help you achieve your goals. They know how to make online ads work harder for you so you can spend more time creating and publishing your great content.

Get superior account management

Certified Publishing Partners are experts at account management services such as:

  • Full-service ad operations, implementation and testing
  • Mobile, web, app and responsive design and development
  • Content moderation
  • Video integration
  • Monetization
  • Ad customization
  • Feel confident

    When you see the Certified Publishing Partner badge it means that a partner has been carefully vetted and meets Google's rigorous qualification standards. They have received high rankings in client satisfaction. They are, in short, a trusted business partner.

    The Certified Partner Program is officially open for business today. Learn more about the program and see a list of our partners. Then let us know what you think in the comments section below.

    Posted by Sahar Golestani
    SMB Publishing Marketing Manager

    Creating native creatives with the DFP API

    Recently, we announced the availability of native ads for apps in DFP. Here, we’re going to introduce you to creating native creatives with the DFP API using the ads Java client library. A native creative consists of a set of assets (headline, image, etc.) which are sent to mobile apps for custom rendering in their own code (see our Android and iOS developer guides for details).

    Native creatives are actually just another type of template-based creative. While the DFP UI abstracts this, in the API you create a native creative using a TemplateCreative with the system-defined native template ID. The creative template IDs available in your network can be retrieved by the getCreativeTemplatesByStatement method in the CreativeTemplateService. You can also view these IDs in the UI under Delivery > Creatives > Native ad formats (see the ID below each native ad format name in the table). The native app install template ID is 10004400.


    TemplateCreative nativeAppInstallCreative = new TemplateCreative();
    nativeAppInstallCreative.setCreativeTemplateId(10004400L);

    Because native creatives do not have a predetermined size, you need to set a placeholder size of 1x1.


    Size size = new Size();
    size.setWidth(1);
    size.setHeight(1);
    size.setIsAspectRatio(false);
    nativeAppInstallCreative.setSize(size);

    Finally, specify a name and destination URL; this example is for the Pie Noon app:


    nativeAppInstallCreative.setName("Pie Noon native ad");
    nativeAppInstallCreative.setDestinationUrl(
    "https://play.google.com/store/apps/details?id=com.google.fpl.pie_noon");

    Settings specific to native creatives are set via template variables. An app install native creative requires the following unique template variable names to be set:

    • Headline
    • Body
    • Image
    • Price
    • Appicon
    • Calltoaction
    • Starrating
    • Store
    • DeeplinkclickactionURL

    Note that creative template variables are case sensitive and those of type AssetCreativeTemplateVariableValue (“Image” and “Appicon”) must have a unique filename.

    You can find the full Java example on how to create native creatives in our GitHub repository here. All of our other ads client libraries have similar examples.

    As always, if you have any questions, feel free to drop us a line on the DFP API forums or the Ads Developer Google+ page.

    Programmatic momentum across our platforms

    Mobile has forever changed the way we live, and it’s forever changed the way we engage with brands. It has fractured the consumer journey into hundreds of real-time, intent-driven micro-moments -- the moments in time when consumers' preferences are shaped and decisions are made. Each one is a critical opportunity for brands, and increasingly we are seeing advertisers turn to programmatic to reach and engage audiences everywhere and win these moments.

    As the industry gears up for Advertising Week next week, I want to reflect on the momentum we’re seeing in programmatic buying across our platforms, especially in mobile. At DoubleClick, the number of advertisers using our programmatic solutions has grown nearly 2x in the last 18 months, and now includes over 80% of the AdAge top 100 advertisers. More broadly, IDC estimates that programmatic spending on mobile display and video advertising in the U.S. will grow from $4.7 billion in 2015 to $22.8 billion in 2019 (a CAGR of 65%.)1

    With people switching between multiple devices throughout their day and increasing their consumption of mobile video, advertisers have changed how and where they buy programmatically in order to connect with people in micro-moments. Both mobile and video impressions served on DoubleClick Bid Manager have grown more than 3.5x since last year, and impressions served via direct deals that are transacted programmatically have nearly tripled. To provide you with the largest pool of inventory, DoubleClick Bid Manager has access to 70 exchanges and API partners, and we prioritize mobile and video inventory sources when identifying new integrations to pursue.

    Ultimately, our engineers spend each day thinking about how to build innovative products that help you win these micro-moments by connecting with the people you want to reach, across screens and at scale. The growth in usage of our platforms shows that we are making progress, but we are even more excited for what's to come. Google has a great line-up of talks set for next week in New York - we hope to see you there.

    Posted by Neal Mohan
    VP, Display & Video Advertising, Google
    1. IDC Report #256782, June 2015 “WW and US Programmatic growth forecasts, 2015-2019”

    Register now for Fall 2015 AdWords API Workshops!

    Fall 2015 AdWords API Workshop registration is now open. Access the registration forms on the workshop website at www.adwordsapiworkshops.com.

    Once you choose a location we'll send you an email confirming your registration.

    Workshops will be held on the following dates and locations:

    • New York City: October 20
    • San Francisco: October 22
    • London: October 27
    • Hamburg: October 29
    • Tokyo: October 29
    • Amsterdam: November 3

    These workshops are technical in nature and are ideal for API developers. We hope to see you at these events. Register today!

    If you have any questions about the AdWords API Workshops, you can post them on our forum. Check out our Google+ page for AdWords API updates.

    Support for v201506 reports in AdWords Scripts

    We have added support for AdWords API v201506 reports in AdWords Scripts. This version adds support for FINAL_URL_REPORT, the Upgraded URLs-compatible replacement for the DESTINATION_URL_REPORT.

    This version also introduces several changes to the reporting columns
    If you use API versioning in your reports, then you need to modify your code to use v201506 as shown below. If you don’t use API versioning, no code changes are required.

    var report = AdWordsApp.report(query, {
    apiVersion: 'v201506'
    });
    If you have any questions about this feature or AdWords scripts in general, you can post them on our developer forum.

    Referrer changes for ad clicks

    We are updating the referrer of ad clicks to improve security and system reliability for users searching on Google. Starting within October, the referrer for many ad clicks will only contain the Google domain from which the click occurred (domains like https://www.google.com or https://www.google.ca). This means that we will no longer be communicating specific paths such as “google.com/aclk” or “googleadservices.com/pagead/aclk.”

    While the referrer will no longer differentiate Google’s organic search clicks from ad clicks, and in some cases may be absent entirely, there are still multiple strategies to track the origin of your clicks. Recommended strategies include: This change is a continuation of our general user security efforts. Users are safer when sites use HTTPS instead of HTTP, which is why we encourage the use of HTTPS. In fact, in August 2014 we began to use HTTPS as a ranking signal.

    By default, browsers do not pass a referrer from HTTPS sites to HTTP sites. To minimize advertiser disruption, we implemented a custom ads solution back when the Google search page migration to HTTPS took place. Now, many modern web browsers provide better control over referrer behavior via the meta referrer tag. This development is an improvement over our previously-implemented custom ads solution both in terms of reliability and latency.

    Programmatic helps brands make the most of micro-moments

    Every day, your audience is filling their days with hundreds if not thousands of micro-moments—intent-rich moments when preferences are shaped and decisions are made. As consumers spread their attention across more and more screens and channels, those moments can happen almost anywhere, anytime. People search on their smartphones while in front of the TV. They watch YouTube videos on their tablets while texting their friends. They open a mobile app to shop for the perfect gift, then head to the store to buy it. With mobile devices never more than an arm’s length away, people can find and buy anything, anytime.

    For marketers, this means the purchase funnel is wildly more complicated than it was just a few years ago.

    “Brands can use programmatic to assemble a consumer’s micro-moments in just the right way—like joining puzzle pieces together—to see a detailed blueprint of consumer intent.”

    It’s hard to plan for nonlinear purchase paths, but programmatic advertising can help, enabling brands to reach the right person with the right message in the moment of opportunity. Brands can use programmatic to assemble a consumer’s micro-moments in just the right way—like joining puzzle pieces together—to see a detailed blueprint of consumer intent. That’s a powerful proposition, and it’s why programmatic advertising spend is projected to grow by more than 77% this year.1

    In this article, we share four tips for using programmatic to win these micro-moments and examples of brands that are doing it right.

    Visit DoubleClick.com to read the full article.

    Posted by Kelly Cox
    Product Marketing Manager, DoubleClick

    1. IDC, Worldwide Programmatic Display Forecast, 2015.

    AdWords API Fall 2015 Workshops Announced

    The AdWords API Workshops are back, and the registration form and agenda will be available on the website soon: www.adwordsapiworkshops.com. In the meantime, you may review the site Resources section for previous event presentations.

    These workshops are a series of technical events, ideal for those who are working with the AdWords API.

    Workshops will be held on the following dates and locations:

    • New York City - October 20
    • San Francisco - October 22
    • London - October 27
    • Hamburg - October 29
    • Tokyo - October 29
    • Amsterdam - November 3

    Stay tuned and keep an eye on the website for more details on how to register.

    --AdWords API Team

    Maximize yield with custom and flexible ad sizes on DoubleClick Ad Exchange

    Over the years, we’ve found that maximizing competition for every impression produces the best results for you. That’s why we’ve developed new Custom and Flexible Ad Size controls in DoubleClick Ad Exchange to bring you even more competition for every impression so you can sell any ad size programmatically.

    Maximum demand for all ad sizes

    Region-specific ad sizes have always been difficult to monetize programmatically because they typically do not match IAB standard ad sizes. Now with Custom Size controls on DoubleClick Ad Exchange publishers can easily create and sell ads of any size programmatically. For example, in Northern Europe where the 800x250 ad size is popular, publishers can now benefit from the programmatic demand of Ad Exchange with all the controls and reporting they’re familiar with.

    In addition to making it easier to implement Custom Sizes, we’re making it possible to increase the demand available to every ad with Flexible Size controls. Publishers can now allow any ad slot to accept bids from multiple ad creative sizes. For example, a custom size slot like 320x300 can now be filled with popular sizes like 300x250 and 250x250 in addition to exact 320x300 matches. Flexible Ad Sizes is now live on all ad slots for publishers globally and publishers can control the range of sizes their slots accept with the Flexible Size rule type.

    With Custom and Flexible Ad Size controls publishers globally can sell ads of any size and maximize yield for them with programmatic demand. During testing, we observed a revenue increase across all Ad Exchange inventory with some publishers seeing CPM gains as high as 30% for affected ad slots.

    "Custom Ad Sizes has enabled us to move the bulk of our programmatic deal making to DoubleClick Ad Exchange, which has simplified things a lot. The Finnish market is very much dominated by market-specific ad sizes, especially 980x400 and 300x300."
    Ville Holopainen, Sr. Operations and Development Manager, Fonecta

    Posted by Zutao Zhu
    Software Engineer, DoubleClick