Igor's Blog

I've written a number of articles about Google DFP in the past, including how to use it on infinite scroll pages and responsive pages. Recently I noticed that DFP has been behaving strangely on some of my sites and used the DFP Publisher Console to try and diagnose the issue. Unfortunately the issue I came across was not something that I could fix (it was in Google's JavaScript), but using the publisher console helped me in making certain of where the problem lied.

Bringing up the console is just a matter of calling the googletag.openConsole() function from the JavaScript console (no need to modify any code!) You can optionally pass the ID of the DIV containing the ad slot if you want to diagnose a specific slot.
 JavaScript
googletag.openConsole(); /* Shows diagnostics for all ad slots */
googletag.openConsole('gurujsonrpc_dfp1'); /* Shows diagnostics for a specific slot */


The console takes a few moment to load, when it does, it appears as a fixed overlay at the bottom of the page. Once the console is loaded all of the ad slots on the page are replaced with diagnostic boxes, which is very handy to see ad slot details quickly. The console shows all loaded ad slots if you didn't pass any parameters to the openConsole() function, otherwise it will only show details of the ad slot that you specified.
dfpdebug_1.png


Clicking over to the 'Page Request' tab of the console will display page load diagnostics. This includes whether your DFP code is tagged correctly or not.
dfpdebug_2.png




The 'Page Request' tab also contains the timeline. This is very handy as it shows what events happened and how long each one took. It can be useful when checking if an ad slot is actually getting rendered or not.
dfpdebug_3.png
dfpdebug_4.png


Jumping back to the 'Ad Slots' tab...each tab has a link to further delivery diagnostics which open in a new window. That page shows detail like which line item was displayed and lets you re-run ad delivery simulation with various parameters set (like country of origin).
dfpdebug_5.png


So there you go, if you're not seeing your ads as expected, pop up the publisher console and see what it reports.

-i

comments powered by Disqus
Other posts you may like...
Programming, DIY, Games, Hacks, and Tech

Recent Blog Posts

Converting a CSV file containing commas in quotes to a pipe separated file using Awk and Bash

How to get Facybox gallery popup to work for images with dynamic URLs

jQuery UI Photoboxr plugin updated to version 0.2

Learn How to Add Disclaimer to All Outgoing Emails in Office 365

How to securely host your web site for free with Google Cloud and CloudFlare (part 3)

How to securely host your web site for free with Google Cloud and CloudFlare (part 2)

How to securely host your web site for free with Google Cloud and CloudFlare (part 1)

Beware of the subtle difference in date format strings between MySQL and SQLite

Postman reporting Unexpected 'N' error in response body

Adding extra shelves to the Ikea Detolf display cabinet

Recent Galleries

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

DIY indoor apartment grow light wiring

Good Friday Electronics fun Easter Bunny LED PCB Kit IBEABU-01.0

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer
Travel ┬ÁBlog

Blogs and Friends

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Please follow me for more great content!
     
Don't show this again