Chapter 5. Tutorial: Place Your First Ad

Step 5: Check It on Your Site

The Debug setting puts a small bar over each slot that tells you what is happening to it. Use it while you set up your ads. Only you, and other users who can manage CLS Ad Slot, see it, and only while logged in to the site; visitors never do.

  1. Go to Components → CLS Ad Slot → Setup → Configurations, set Debug to Yes and save.

  2. Log in to your site's front end with your administrator account and open a page with your ad. Switch off any ad blocker for your site, or you will only ever see blocked ads.

  3. Look at the bar over the slot:

    state:filled | lazy:true | collapse:true | fallback:false | adsense:ready

    state:filled means Google sent an ad. If you see something else, look it up in the section called “Reading the Debug Bar”.

    Figure 5.3. The debug bar over a filled slot
    A display ad on the site with the green-on-black debug bar across its top edge.

  4. Compare the height of the ad with the space around it. Right-click just outside the ad and choose Inspect. In the developer tools, hover over the element whose id starts with jch-adslot-: the browser highlights the reserved space. If the ad is taller than the space, raise the minimum height for this screen size. If there is a lot of empty space around it, you can lower it.

  5. Repeat at tablet and phone widths. Use the device toolbar in the developer tools (Ctrl+Shift+M) to change the width, and reload the page each time.

Note

Google doesn't always send the same ad, and different ads can have different heights. Check a few times, and choose a height that fits the tallest ad you see regularly.