Tag Archives: AdSense

Support for shared negatives in AdWords Scripts

AdWords Scripts now support negative keyword and excluded ad placement lists, and the ability to share them across campaigns. Follow these links for implementation details and code examples: We have also released a new solution named Master Negative List that uses this feature to maintain a master list of negative keywords and placements for AdWords accounts. The list of negative criteria can be managed from a spreadsheet. Separate versions are available for AdWords accounts and manager accounts.

Special thanks goes to Terence Nip, who implemented this feature during his summer internship at Google.

Give this feature a try and let us know what you think! You can post your questions and feedback on our developer forum.

Manual Ad Break Playback Part Deux: Welcome Back!

Today we’re expanding on our earlier blog post, Manual ad break playback in the IMA SDKs. One of the major benefits mentioned in that blog post is the ability to let your users skip ads they’ve already seen when they resume a video stream they previously suspended. We’re going to show you how to implement that functionality. For the purposes of this demo, we’ll be using the HTML5 SDK, but the principles outlined here can be used to achieve the same functionality in all four of our SDK flavors.

Prerequisites

If you’d like to follow along with these samples, you’ll need to first:

  1. Get a copy of our simple sample for HTML5.
  2. Modify that sample to disable automatic playback of ad breaks, as outlined in this guide. Be sure to remove the original call to adsManager.start() in onAdsManagerLoaded!
  3. Change the ad tag to a playlist with multiple mid-rolls (like this one) so you can see the behavior in action.

Step 1: Saving the user’s progress

The first step towards our ultimate goal is to save the current time of the video when the user leaves the page. For simplicity’s sake, we’re going to be using HTML5’s built-in localStorage object. We’re going to override window.onbeforeunload to grab the current time of the video element when the user leaves the page and save it in local storage.


function init() {
videoContent = document.getElementById('contentElement');
playButton = document.getElementById('playButton');
playButton.addEventListener('click', requestAds);

window.onbeforeunload = onUserExit;
}

function onUserExit() {
if (videoContent) {
localStorage.setItem('watched_time', videoContent.currentTime);
}
}

Step 2: Restoring the user’s progress

Now that we’re saving the user’s progress, we’ll want to restore the video to that point when the user returns to the page. We’re going to add some code to the init method to grab the stored current time (if it exists) and seek to that time when our video loads.


function init() {
videoContent = document.getElementById('contentElement');
playButton = document.getElementById('playButton');
playButton.addEventListener('click', requestAds);

window.onbeforeunload = onUserExit;

watchedTime = localStorage.getItem('watched_time') || 0;
videoContent.addEventListener('loadedmetadata', function() {
videoContent.currentTime = watchedTime;
});

}

Step 3: Skipping previously viewed ads

Now that we’re keeping track of the user’s progress and restoring that progress when the user returns, we can skip and ad breaks they watched in a previous visit. To do that, we’ll modify our adBreakReadyHandler to call adsManager.start() only when the loaded ad break is set to play after the user’s most recent saved progress. To ensure the video starts after the skipped ad breaks, we’ll also add a call to videoContent.play() when we decide to skip an ad break.


function adBreakReadyHandler(event) {
if (event.getAdData().adBreakTime >= watchedTime ||
event.getAdData().adBreakTime == -1) { // -1 ensures we play post-rolls

adsManager.start();
} else {
videoContent.play();
}

}

That’s all there is to it! Try starting your video and watching the first mid-roll break. When you leave the page and come back, clicking the play button will result in the video playing from where you left off. The first ad break you’ll see is the second mid-roll break.

As always, if you have any questions feel free to contact us via the support forum.

Updated AdWords API remarketing guides

Have you ever wanted to advertise to people who previously visited your site or mobile app? This remarketing strategy can be implemented using the AdWords API. For example, you can target ads to people who left your website without buying anything to encourage them to return and make a purchase.

We recently updated our Remarketing and Rule-based Remarketing guides to more clearly show you how to use the API to get started quickly and implement some of the most common remarketing strategies.

Remarketing resources As always, feel free to visit us or ask questions on the AdWords API Forum or our Google+ page.

More features now available in the AdWords API

Following the release of AdWords API v201506, we've added a few additional features that are available immediately:
  • Android App ‘first open’ conversion tracking. Recently available in AdWords, this new conversion tracking solution measures when a user first opens an app after clicking on an ad and completing an Android app install. Check out the new FIRST_OPEN conversion type in the AppConversion tracker that also supports Postback URLs for Android.
  • A new report specific to final URLs: FINAL_URL_REPORT. The report replaces the deprecated DESTINATION_URL_REPORT and provides statistics aggregated at the final URL level.
We also launched account hiding support recently—see this announcement if you missed it. If you have any questions, feel free to reach us on the forum or via the Ads Developers Plus Page.

Handling App Transport Security in iOS 9

The rollout of iOS 9 is expected to come this Fall and will introduce a new privacy feature called App Transport Security (ATS) to enforce best practices in secure connections between an app and its back end. This change may need your action if you are developing with the Google Mobile Ads SDK and building an app against the iOS 9 SDK.

We recommend using HTTPS exclusively if you’re developing a new app. If you’re working on an existing app, we suggest using HTTPS as much as possible and creating a plan to migrate the rest of your app toward ATS compliance.

All iOS 9 devices running apps built with Xcode 7 that don’t disable ATS will be affected by this change. The following log message appears when a non-ATS compliant app attempts to serve an ad via HTTP on iOS 9:

“App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file.”

While Google remains committed to industry-wide adoption of HTTPS, there isn’t always full compliance on third party ad networks and custom creative code served via our systems. To ensure ads continue to serve on iOS9 devices for developers transitioning to HTTPS, the recommended short term fix is to add an exception that allows HTTP requests to succeed and non-secure content to load successfully.

Publishers can add an exception to their Info.plist to allow any insecure connection:


<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

If you have any questions regarding these changes, feel free to contact us through our forum.

Announcing v201508 of the DFP API

It’s finally here, the release everyone some of you have been waiting for: v201508. I know you’re excited and probably want to go download an updated version of the client library right away, but give me a second to tell you why you should be excited.

We’ve improved the reconciliation services in the DFP Sales Manager API, making for easier updates and reporting. There’s a bunch of changes to trafficking creatives giving you more control and visibility over your creative library. We’re also cleaning house on reporting, making the columns and dimension attributes you know and love that much easier to use.

(see full release notes here).

DFP Core

DFP trafficking objects received a few facelifts in this version.
  • We removed IDs from CreativePlaceholders (don’t worry, they weren’t being used anywhere).
  • On the creatives front, we switched Flash creatives over to use CreativeAssets, which should make duplicating and reusing flash creatives much easier. And we added CreativePolicyViolations to each creative so you can know exactly why a creative or line item was paused.
  • We’ve updated line item creative associations by adding a DeleteLineItemCreativeAssociations action to match UI functionality. It should be noted that deleting them is a permanent action and not simply a change in status. Deleted LICAs will no longer be accessible in the UI or API.

Sales Manager

If it’s been your dream to reconcile your delivery and billing data at the line item level, you should probably sit down for this, because featured in this release is the addition of the ReconciliationLineItemReportService which brings parity to the reconciliation process in the UI.

Additionally, we’re adding a few replacement DimensionAttributes to our ReportService - PROPOSAL_LINE_ITEM_LAST_RECONCILIATION_DATE_TIME, PROPOSAL_LINE_ITEM_RECONCILIATION_STATUS, and their LINE_ITEM_* equivalents to use for when you start reconciling line items. See the related blog post on the removal of the RECONCILIATION_RECONCILIATION_STATUS and RECONCILIATION_LAST_DATE_TIME columns found here.

Reporting

We’ve removed all DimensionFilters, as stated earlier this year (ones that have significant usage are replaced with PQL filters), added two new dimensions for ORDER_DELIVERY_STATUS as well as AGGREGATED_DEMAND_CHANNEL, and renamed the Nielsen metrics from NIELSEN_OCR_* to NIELSEN_*.

As a reminder, with each new release comes a new deprecation. If you're using v201408 or earlier, it's time to look into upgrading. If you have any questions about upgrading, let us know on the developer forum.

Demystifying AdSense policies with John Brown: What to do if you receive a warning message (Part 4)

Editor’s note: John Brown, the Head of Publisher Policy Communications, is explaining what to do if you receive a policy warning message.

In this post, I’d like to talk about policy warning messages and what steps you should take if you receive one. I’ll also answer some of the most common questions around warning messages.

What is a warning message?
We send out warning messages to our publishers if their site, or a page of their site, violates our AdSense policies. For minor policy violations that can be fixed fairly easily, our first step is to issue a warning.

Where can I see my warning message?
Warning messages are sent to the email address associated with your AdSense account. You can manage your contact email address under Personal Settings in your account. You can also check out outstanding policy violations by visiting the Status page in your AdSense account.

What do I do if I get a warning?
If you receive a warning message, follow these steps to fix the violation as quickly as possible:
  1. Read the instructions in the warning message very carefully to understand how the flagged policy violation corresponds to the particular page of your site.

    • Optimally, we would recommend simply removing Google AdSense code from the violating pages. You do not need to remove Google AdSense code from your whole website, just the violating pages.

    • If you are unable to or unsure of how to remove the ads from these pages, or would like to continue monetizing the page with Google ads, please modify or remove the violating content to meet our AdSense policies.

  2. Multiple pages of your site might be violating the policies. Check all your pages of all of your sites to make sure they’re compliant. 
  3. When adding new content to your site on pages with Google ads, ensure that these pages comply with Google policies. Our warning emails include a URL from your website of a violating page, but it is possible that other pages on your site have violations as well. Review all your sites and pages to make sure they are policy compliant.
What is the timeline to fix the violation?
After receiving a warning, you should immediately take time to review your pages where Google AdSense code is implemented and ensure that it complies with our policies. If you fix the violation or remove the ad code from violating pages, you don’t need to contact us.

How do we determine how to send warning messages?
It is a common misconception that AdSense disables websites and sends warning messages randomly. We rely upon a detailed set of guidelines when looking at policy violations, which you can find in the AdSense Help Center.

Do we ever disable ad serving to a site without first sending a warning? 
There are some situations when we would need to disable ad serving to a site without first sending a warning. We usually take this action for extreme violations like adult content and copyright infringement, as well as cases of violent content. We may also disable ads to a site when we find a violation that we’ve already contacted a publisher about in the past.

How can I appeal a disabling and get ad serving reinstated?
If ad serving on your site is disabled due to a policy violation, there are steps you must take in order to have ads reinstated. First, the page(s) of your site that is in violation of Google policies must be reviewed. As mentioned in my previous blog post, our obligations to advertisers drive many of our policies and enforcement of our policies. Therefore, we simply ask that you remove our ad code from the violating page(s), ensuring our advertisements do not appear alongside content that violates Google policies. Once the ad code has been removed, you can then file an appeal after reviewing our policy appeals Help Center article. Sometimes users delete all their Google AdSense code; you don't need to remove the ad code from non-violating pages before sending the appeal.

To make sure that the appeal is a strong one, please tell us exactly what action you've taken on your site to resolve the violations and also tell us how you'll prevent similar occurrences in the future. I recommend that you include some other example URLs that you've taken action on proactively.  We want to work with our publishers to help them grow their businesses while remaining policy-compliant.

You can find more information about policy appeals here.

Is there a point at which an account can get shut down completely? 
The final and most severe action that our teams can take is to close down an account completely. This normally only happens when we find egregious policy violations, if a large portion of a publisher’s network consists of violating sites, or for repeat policy offenders.

I hope this helps you to deal with policy violations. For more information about policy warnings, check out this Help Center article. We’d love to hear your thoughts to improve our processes. Let us know what you think in the comment section below this post.

Subscribe to AdSense blog posts



Posted by John Brown
Head of Publisher Policy Communications

Source: Inside AdSense


Integrating with DFP as a third party

Does your company want to provide third-party services for DFP but is unsure how to get started? If so, you're in luck! We've just published a new guide on how to integrate with DFP as a third party. The guide covers the major topics that new integrators commonly run into:

  • How to get started.
  • How to test your DFP integration.
  • How to properly set up authentication to access a client's network.
  • How to keep up to date with API versions.
  • Where to get support.

All this information can be yours just by visiting our guide.

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

New Swift samples for the Google Mobile Ads SDK

In response to the growing popularity of Swift development, we’ve added Swift samples for the Google Mobile Ads SDK to our GitHub repo. To make it easier for developers to get started using Swift, we’ve also added Swift code snippets to our Get Started and Interstitial guides.

If you have any questions about using Swift with the Google Mobile Ads SDK, you can reach us on our forum. Remember that you can also find us on Google+, where we post updates on all of our Google Ads developer products.

IMA HTML5 SDK custom playback changes

On September 16th, 2015, the IMA HTML5 SDK will change how it handles custom playback. In order to provide a more seamless ad experience, custom playback on Android 4.0+ devices will be disabled.

As per a previous change, the SDK only selects custom playback when necessary. Since Android 4.0+ devices support standard rendering, it is no longer necessary to use custom playback on these devices.

What must I do to prepare for this change?

  1. Double check to make sure you’re always passing in your content video element as the custom playback element. Custom playback will still be used in pre-4.0 Android environments.
  2. On mobile, be sure you’re calling AdDisplayContainer.initialize() as a result of a user action. This method is not necessary in custom playback, but it must be called to play ads using standard rendering. Otherwise your ad video will not play. We recommend you always call this method on mobile, so your implementation will be ready for any future devices that support standard rendering.
  3. If your code requires a reference to the <video> element playing the ad, then this change might break your implementation. Instead, check the return value of AdsManager.isCustomPlaybackUsed(). If the value is true, the content video reference will be the same as the ad video reference.

If you have any questions about these changes, feel free to contact us via the support forum.