Advanced Ads comes with an ad type dedicated to Google AdSense. Choosing this type over the plain text type to display AdSense enables the use of many special features, including:
- supports all ad types, including display ads, link units and matched content
- import of ad details from ad tags
- choose between normal and responsive ad format
- optional limit to 3 AdSense ads to prevent violations of AdSense terms
- select specific ad sizes depending on the browser width (with the Responsive add-on)
Set up an AdSense ad
To set up an AdSense ad, you must first create a new ad and choose the AdSense ad type from the ad type selection shown on the following picture.
Once you chose the type, you will see the code input field in the ad parameter box where you can insert the AdSense code and click on Get Details. This will import all ad settings automatically. You can also choose to insert them manually though.
AdSense Ad Types
AdSense has multiple ad sizes and features (content ad, link unit, matched content, InArticle) and Advanced Ads can handle all of them. You can either set the ad type when creating a new ad in your AdSense account or within Advanced Ads. You can also convert some ad units into another format with Advanced Ads (e.g. for testing). Not all combinations are possible, though. The following tables shows the available combinations.
|Ad size in AdSense||possible Type in Advanced Ads|
|Link Unit or Matched Content|| Normal, would use the type set in your AdSense account|
or set the type like in AdSense (still needed for some older codes)
|Matched content with specific size (not responsive)||Normal|
|fixed sized or responsive content ad units||Choose any type to convert this unit to it, e.g. change a fixed sized ad into a responsive one|
When you don‘t know which type to choose then just import your AdSense code using the Copy&Paste existing code button.
Global AdSense settings
Advanced Ads uses the same AdSense ID for each ad and therefore stores it globally. The publisher ID is saved automatically when you create your first AdSense ad. However, you can find and change your publisher ID in your dashboard in Advanced Ads > Settings > Google AdSense > Account ID.
Where to find the Publisher ID?
If you don’t know your Publisher ID, log into your AdSense account, click on your email address on the top right of the window. It should look like the following.
You can also find your Publisher ID when clicking on the gear icon and go to Settings > Account > Account Information.
AdSense Ad Limit
Previously, AdSense allowed you to use up to 3 display ads per page. This specific limit was removed from their terms and replaced by a flexible approach. However, we kept the AdSense ad limit setting for now.
On very complex ad setups it might happen that more than those 3 ads get loaded. To prevent this from happening accidentally, Advanced Ads can check the number of AdSense ads per page and only displays the first 3 of them. You can find the setting on Advanced Ads > Settings > Google AdSense.
Please be aware that dynamic ad serving like passive cache-busting and placement tests are not working properly with this limit enabled.
Enable Page-Level ads
If your AdSense account allows Page-Level ads then you can enable them with just one click on the AdSense options.
Before checking this option check if Page-Level ads are already available in your AdSense account: My Ads > Content > Page-Level ads.
What else you need to know
No ads on 404-pages
According to the AdSense terms, ads should not be displayed on 404 error pages. Advanced Ads disables AdSense ads on these pages by default.
You can disable this behavior by defining the constant ADVADS_ALLOW_ADSENSE_ON_404 in your wp-config.php using the following code.define( 'ADVADS_ALLOW_ADSENSE_ON_404', true );