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

, ,
About — I'm an enthusiastic software engineer and consultant interested in many fields including J2EE, programming, electronics, 3D printing, video games, wood working and gardening.
See my Resume for more information.
The views expressed in this blog are my own and not those of my employer.
comments powered by Disqus
My other posts you may like...
Programming, DIY, Games, Hacks, Tech and more.
Follow me on...
Current and Past Projects
See my Resume

Subscribe


RSS Feed

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

Recent Blog Posts

How to install Panel Glide Blinds from Blinds Online

Showing whitespace characters in vi

Using Jackson to automatically convert Java POJOs to JSON as output of a Jersey service

Enable quick access to the keyboard and emoji viewer in macOS

How to tell if your site is served via CloudFlare

Googe Cloud Platform doesn't support CloudFlare's free edge certificates

Fixing the invalid private key error in the Google Cloud Platform App Engine app Settings page

Cleaning the sticky PlayStation controller analogue thumb sticks

Invoking interactive shell scripts non-interactively

Using variables as column numbers with Bash and Awk when processing text files

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

Top Categories

Blogs I follow

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth

Friends

RAWS Parts Online
Alpha Dimensions Hosting
Kristensen Photography
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Follow me on... 
     
...or subscribe for updates!

Don't show this again