Module: Google::Ads::Helpers

Defined in:
lib/nesta-plugin-google-ads/init.rb

Instance Method Summary collapse

Instance Method Details



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/nesta-plugin-google-ads/init.rb', line 5

def google_ad options={}
  opts = Nesta::Config.google_ad.merge(options)

  # all options are required for the add to work correctly
  %{
  <script type="text/javascript"><!--
    google_ad_client = "#{opts["client"]}";
    google_ad_slot = "#{opts["slot"]}";
    google_ad_width = #{opts["width"]};
    google_ad_height = #{opts["height"]};
    //-->
    </script>
  <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
  }
end