Search
Clear search
Close search
Google apps
Main menu

Grow your ad revenue and get your website into shape for the holiday season! Check out our blog post for additional information.

Ad code implementation

Guide to testing Page-level ads

Because AdSense only shows Page-level ads on your site at optimal times, you can use the preview tool to check that your ads are working correctly. To help you troubleshoot any problems you might encounter while testing your Page-level ads, we've put together the following information on possible issues. Please keep in mind that the AdSense program policies also apply to Page-level ads.

The preview tool isn't working

If you're having trouble getting the preview tool to work, try the following:

  • Make sure you're using a mobile device. Note that Page-level ads might not work on very large devices.
  • Refresh the page where you're testing Page-level ads.
  • Make sure that you've placed the ad code in the <head> tag (or at the top of the body) of your page that you want to test.

A valid vignette link won't show a vignette ad

Sometimes, the preview tool will highlight a link on your page that can show a vignette ad, but when you click on the link it doesn't show a vignette. There are a few reasons why this might happen:

  • You changed the orientation of your device from portrait to landscape mode. Turning your device back to portrait mode should cause the link to show vignette ads again.
  • Your link has unsupported functionality. Unsupported link implementations include:
    • Your link opens a new tab, or, if it's within a friendly iframe, your link doesn't navigate the top window.
    • Your link is not an anchor tag (<a>) that navigates to a destination determined to be intra-site, e.g., you have a link on example.com that directs to notexample.com.
      Note: sites that rely on click listeners which use window.location.href to navigate will not trigger a vignette ad.
    • Your link is to exactly the same location as the current page, or only a hash change (e.g., AngularJS implementations).
    • The click event has had preventDefault called on it by your click handler.
  • You changed the link destination. For example, you might have changed the destination location to a link outside of the site, or to a link that contains a "stop" word. AdSense has a list of "stop" words that are typically navigation related, e.g., "Log out", for which vignette ads aren't shown. In either case, AdSense is unable to show vignette ads.

How to disable specific links from showing vignette ads

To stop a vignette ad from showing when a user clicks on a specific link on your site, add data-google-vignette=”false” to your anchor tag.

Here's an example: <a href="example.com" data-google-vignette="false">link</a>

Your page can't show Page-level ads

In some cases the preview tool will report that your page can't show Page-level ads. When this happens, take note of the reasons given by the preview tool and check the following sections for instructions on what to do next:

Reasons why your page can't show anchor/overlay ads
Reason Description What you should do
The current browser is not supported and/or the browser does not support window.postMessage. Anchor/overlay ads are only supported on certain mobile browsers.

Android:

  • The default Android browser, Google Chrome, and Opera for Android are supported on devices running Android 4.0 Ice Cream Sandwich and higher.
  • Firefox for Android is not supported.
  • Opera Mini is not supported.

iOS:

  • Google Chrome and Safari are supported on devices running iOS5 and higher.
  • Opera Mini is not supported.

Windows Phone:

  • Anchor/overlay ads are not supported in any mobile browser on Windows Phone.
Visit the page where you're testing Page-level ads on a supported mobile browser.
The device is not in portrait mode. Your device is currently in landscape mode. AdSense can only show anchor/overlay ads when the device is in portrait mode. Turn your device to portrait mode.
The viewport is not between 320 and 420 pixels wide. Anchor/overlay ads are only supported on mobile devices with viewports between 320px and 420px wide. Visit the page where you're testing Page-level ads on a non-tablet mobile device which has a viewport between 320px and 420px wide.
Your browser's current zoom is not neutral. You're either zoomed in to or zoomed out of your page. AdSense can't show anchor/overlay ads on pages that are zoomed in/out. Reset your browser's zoom back to a neutral level. Example:
<meta name="viewport" content="width=device-width, initial-scale=1">

 

Reasons why your page can't show vignette ads
Reason Description What you should do
The current browser is not supported and/or the browser does not support window.postMessage. Vignette ads are only supported on certain mobile browsers.

Android:

  • The default Android browser, Google Chrome, and Opera for Android are supported on devices running Android 4.0 Ice Cream Sandwich and higher.
  • Firefox for Android is not supported.
  • Opera Mini is not supported.

iOS:

  • Google Chrome and Safari are supported on devices running iOS5 and higher.
  • Opera Mini is not supported.

Windows Phone:

  • Internet Explorer is supported on devices running Windows 8 and higher.
  • Opera Mini is not supported.
Visit the page where you're testing Page-level ads on a supported mobile browser.
The device is not in portrait mode. Your device is currently in landscape mode. AdSense can only show vignette ads when the device is in portrait mode. Turn your device to portrait mode.
The viewport is not between 320 and 420 pixels wide. Vignette ads are only supported on mobile devices with viewports between 320px and 420px wide. Visit the page where you're testing Page-level ads on a non-tablet mobile device which has a viewport between 320px and 420px wide.
Your browser's current zoom is not neutral. You're either zoomed in to or zoomed out of your page. AdSense can't show vignette ads on pages that are zoomed in/out. Reset your browser's zoom back to a neutral level. Example:
<meta name="viewport" content="width=device-width, initial-scale=1">

Page-level ads aren't showing even after you've successfully previewed them

Keep in mind that AdSense only shows Page-level ads when they're likely to perform well for you and provide a good experience for your users. If your Page-level ads don't have any impressions, it may be that AdSense hasn't displayed a page-level ad yet or that your users haven't viewed your page yet.

Note that the preview tool allows you test Page-level ads on any page that has any type of AdSense ad code on it. You should also make sure that you've:
  • Placed the ad code for Page-level ads in the <head> tag (or at the top of the body) of your page.
  • Turned on the ad formats in the "Page-level ads" section of the My ads page in your AdSense account.
Was this article helpful?
How can we improve it?
Sign in to AdSense

Sign in to AdSense to see help for your account

Don't have an AdSense account? Sign Up for AdSense!