Skip to content

About

Ruby On Rails helpers and assets for Google DFP

Resources

Stars

0 stars

Watchers

2 watching

Forks

 
 

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

Google DFP

Ruby On Rails helpers and assets for Google DFP.

Installation

Gemfile:

gem 'google_dfp', :git => 'git://github.com/digineo/google_dfp.git'

Create a /config/google_dfp.yml in your rails project containing all configured ads:

leaderboard:
  size: 728x90
  unit: /123456/leaderboard
skyscraper:
  size: 120x600
  unit: /123456/bigsize

Add the supplied javascript to your asset pipeline (e. g. /app/assets/javascripts/application.js)

//= require google_dfp

Please ensure the google_dfp.js is inserted at the bottom of your <body> element and jQuery is loaded before.

Usage

Just call the dfp_tag helper in any view to include insert a DFP tag.

<%= dfp_tag :leaderboard %>

You can optionally specify a targeting hash:

<%= dfp_tag :leaderboard, { :country => 'US', :customer_job => 'teacher' } %>

Copyright

Copyright © 2012 Digineo GmbH, released under the MIT license.

About

Ruby On Rails helpers and assets for Google DFP

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors