Forum: Ruby on Rails Managing ads banner

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7941135a1ec26984e2eb08c219b20e77?d=identicon&s=25 Youyou Semsem (semyou)
on 2009-03-13 17:37
Hi guys,

What is the best way to include ad banners in rails? Do you include them
in default layout? What is the ideal way if the ad has to change each
time?

Thanks,
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2009-03-13 18:36
(Received via mailing list)
> What is the best way to include ad banners in rails? Do you include
> them
> in default layout? What is the ideal way if the ad has to change each
> time?

My advice would be to not to do it.  Tie Rails into an existing ad
server.  You really don't want to have to write your own ad server if
you can avoid it.

You may find this useful:
http://pjkh.com/articles/2006/12/21/integrating-op...

I'm assuming you want to sell your own banners, otherwise integrating
Google Adsense or similar is as simple as just dropping in the code.

-philip
7941135a1ec26984e2eb08c219b20e77?d=identicon&s=25 Youyou Semsem (semyou)
on 2009-03-13 19:13
Philip Hallstrom wrote:
>> What is the best way to include ad banners in rails? Do you include
>> them
>> in default layout? What is the ideal way if the ad has to change each
>> time?
>
> My advice would be to not to do it.  Tie Rails into an existing ad
> server.  You really don't want to have to write your own ad server if
> you can avoid it.
>
> You may find this useful:
> http://pjkh.com/articles/2006/12/21/integrating-op...
>
> I'm assuming you want to sell your own banners, otherwise integrating
> Google Adsense or similar is as simple as just dropping in the code.
>
> -philip

Thank Philip.

I was actually investigating both options, making my own or using
adsense.Can you please share some information (or links) on how to
integrate Adsense in my code?

Thanks,
Youssef
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2009-03-13 19:55
(Received via mailing list)
>>
> I was actually investigating both options, making my own or using
> adsense.Can you please share some information (or links) on how to
> integrate Adsense in my code?

Just drop the code into your views...

If you want to make it a bit more configurable, setup a simple admin
tool where your ad guy can paste the adsense code into a text_area and
then include that.  Add some keys so in your view you'd do something
like:

<%= AdsenseCode.find_by_key("homepage_bottom_right") %>

Or similar.
6714eea0c790f9ec5cbb43fc5d7a0135?d=identicon&s=25 Asim (Guest)
on 2009-04-09 23:22
(Received via mailing list)
On way to do this is as mentioned on this blog. I used it and it gave
some simple steps to getting google ads up and running on my RoR
application

http://atservice.blogspot.com/2008/07/google-ad-se...

On Mar 13, 9:37 pm, Youyou Semsem <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.