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

Please leave your comments or feedback below!
comments powered by Disqus
Other posts you may like...
Hi! You can search my blog here ⤵
Or browse the recent top tags...

Recent Blog Posts

WebLogic Maven Plugin - How to fix the MojoExecutionException: The artifact location was not specified

jPhotoFrame version 0.4 released with a whole new layout engine

Upcycling a couple of old broken lamps to create something amazing

A custom exception mapper and writer for a RESTful JAX-RS Jersey service

How to fix Plex error - Sorry there was a problem playing this item

Jersey JAX-RS filters and interceptors execution order for a POST request

Fix your Mac - users not showing on the macOS login screen when FileVault is enabled

BMB-012 Nanoblock T-Rex Skeleton Model assembly

Writing a custom MessageBodyReader to process POST body data with Jersey

How to make Skype for Business responsive again on macOS

Recent Galleries

BMB-012 Nanoblock T-Rex Skeleton Model assembly

Tiny Arcade revision 6 kit assembly and decal application

Atari Lynx repair - Part 5 - McWill LED screen mod installation

Atari Lynx repair - Part 4 - screen cover replacement

Atari Lynx repair - Part 2 - re-capping the motherboard

Atari Lynx repair - Part 3 - broken speaker replacement

Atari Lynx repair - Part 1 - introduction and case disassembly

Building a custom Atari Lynx game box storage shelf unit in a day

Protecting old Atari Lynx game boxes with snug fit plastic sleeves

Monument Valley 2 is released and does not disappoint

Blogs and Friends

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

Blog Activity

Blog Activity