Question

Is there a way in development and staging environments to show adverts or at least a place holder of some sort?

Currently I have have added a conditional css file to style the advert place holders using

if Rails.env.staging? || Rails.env.development?
  stylesheet_link_tag "google_dfp_placeholder"
end

But is there a way to get DFP to serve a placeholder at all using say a javascript method?

Its going to be really annoying having to develop and not know how the adverts will look on the site. Surely there is some functionality to allow you to get the ads, make them unclickable and not have them track impressions..?

Was it helpful?

Solution

I created a jQuery DFP plugin to help me with this.

Using this plugin I can target ads at specific domains so all of my real ads are targeted at www.example.com and then I can make up some test ads within dfp that are targeted at stg.example.com and dev.example.com... really makes life easy!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top