Ad code implementation
How to set up Page-level ads
To set up Page-level ads to appear on the pages of your site, follow these steps:
- Sign in to your AdSense account.
- In the left navigation panel, click My ads.
- Click Content, then click Page-level ads.
- On the "Page-level ads" page, use the controls to select which ad formats you'd like to show on your site.
- Click Get code.
- Copy the ad code and paste it in the
<head>tag (or at the top of the body) of each page that you want to show Page-level ads. If you're not sure how to do this, you might want to review our Code implementation guide.Note that you only need to do this once per page. The ad code is the same for every page on every site where you want to show Page-level ads. After you've pasted the ad code, you can still make changes to your Page-level ads settings at any time without having to change the ad code.
- (Optional) Test your Page-level ads with the preview tool.
Because AdSense only shows Page-level ads on your site at optimal times, you'll need to use the preview tool to check that they're working correctly:
- On a mobile device, visit the page where you want to test Page-level ads.
- In the address bar of your mobile browser, add
#googleadsto the end of your page's URL, e.g.,
- Select the ad format that you want to test.
- Check the results of the test on your device.
For vignettes, the preview tool highlights all the links on your page that can show a vignette ad. Click any of these links to test your vignettes. Note that the preview tool won't highlight any links that contain 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.
If your Page-level ads aren't working or you're having problems with the preview tool, see our guide to testing Page-level ads.
- When you've finished testing, click OK, got it to close the preview window.
Tracking the performance of Page-level ads
You can track the performance of your Page-level ads by viewing the Ad behavior report on the Performance reports tab. Page-level ads are shown under the "Anchor/overlays" and "Vignettes" labels in the report.
Note that the coverage metric is not available for Page-level ads.