the mobile advertising service

A few weeks ago I posted about the Ads module within the RMobio ruby gem (which is posted on RubyForge). The ads module allows developers to easily add advertising to their mobile apps written in Ruby (actually it should work for any web app written in Ruby app, but the advertising networks supported are mobile focused). You make calls to the get_ad method within your app and can configured the ad network and your publisher ID as you go.

Some of our apps at Mobio are written in Java however. We needed a way to allow those apps to use the ads module as well. So we needed to create a REST interface to the Ads module. However the ads service goes further and allows developers and administrators to manage their list of configured ad networks as well as their apps and pages within their apps. Specifically it lets the appropriate ad network and keywords to be used for any app, or specific page within the app, to be configured. Then developers simply call get_ad and identify the app and/or page that they are calling get_ad from. The service then determines the appropriate ad network to connect to.

Administrator Usage

The administrator (or developer) that wants to set up the ads service for an app has two primary tasks: set up the ad network and then configure apps and/or pages to work with those ad networks. First they will need to connect to the ads service from their browser. The ads service currently hosted at

Setting Up Ad Networks

After clicking on Manage Networks the administrator should add networks for the mobile advertising networks they wish to use. Their are currently four types supported: Google (AdSense), mKhoj, Smaato and AdMobs. More advertising networks will be added soon.

First enter an arbitrary name for your network that is unique to you. Then choose the type of network (from those just discussed). Then enter the URL to connect to. Some networks may not use this argument, they may just always be available at the same URL. So this is optional for example with Google AdSense.

Then enter the login (client or publisher ID) for your network. Many ad networks (such as Google AdSense) don’t require a password.

Configuring Apps and Pages

The developer will call the ad retrieval method from their app, typically supplying the call with their app name and the page within their app. If it is planned to use a single ad network AND keywords for retrieval for the entire application, then only apps need to be configured.

In either case, first click on Manage Apps and add the name of your application. Then choose a network for it (generally the one you entered above). If you choose a network that isn’t “yours” (your login ID) you’ll just end up making money for someone else! (hence the lack of “security” for this choice).

If you wish some or all pages of your application to use a different ad network and/or keywords than the one configured for the overall app, then enter some pages as well. Supply the URLs of the page in the “page” argument. Or just supply a symbolic name for the page, such as “Home Page” or “Options Page”. The “page” name will only be used to look up pages when the developer makes the get_ad call.

Developer Usage

Once networks and apps and pages have been configured the ads service can be used from your applications. Simply make a call to the get_ad method on the pages controller. Supply arguments of the “app” and/or the “page” within your application. These should match values that have been configured in the previous steps.

Specifically the call looks like this<your appname>&page=<some page identifier>

If the ads service can’t find the page supplied then it will drop back and use the ad network and keywords set up for the app. The page argument does not even need to be supplied if you are using the same network and keywords for all pages in your app. The app argument also doesn’t need to be supplied if you’re just going to use pages for lookups. In other words it can be as “simple as you want it to be”, though many developers find having a hierarchy of pages with specific ad networks and keywords and overall apps when pages can’t be found to be a helpful set of abstractions.

To make this even more concrete, here’s a more specific sample call:<your appname>&page=<some page identifier>

Terms of Service

This is a developer testing instance of the ads service. We do keep it running. But we don’t guarantee any terms of service for it. Also note that its not “multitenant”. The assumption is that any developer using it will create their own app. The only thing that will happen by using someone else’s configured app in your code is that you will end up crediting their publisher ID and giving them money. So if you do choose to use this for development and experimental purposes you’ll want to set up your own app. If you want to use this in a production app, contact me and we can arrange for use of one of our production instances.

In general we will be making all of our platform available for other mobile app developers soon. So access to a production ready ads service will just be a natural outgrowth of that.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: