Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

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

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.