innerActive mobile ads for Widgets
May 7, 2010I’ve been developing widgets for mobile phones for quite a while now. One the most pressing issues I always face is how to make money from my widgets.
I tested many services that seemed to be promising only to be frustrated from the revenue they generate, the amount of control I had over the ad or the complexity of integration (if at all available for widgest).
Finally I found a solution that I like, simple to integrate and offers me some control over the ad life cycle from innerActive. I moved all my mobile apps to innerActive and this solution works like a charm (and NO – I don’t work there).
Just follow these few simple steps and start making money from your app:
1. get an Application ID for you widget/app from innerActive (contact Aviv Fishler from innerActive: aviv@inner-active.com)
2. load jQuery in your all (I hear that they have a pure JS version coming soon) using something like:
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
3. load the innerActive js file in your widget header from: http://cd1.inner-active.com/innerActive.js
<script src="http://cd1.inner-active.com/innerActive.js"></script>
4. add a div for you ad in every place you want to put your add.
<div id="banner1">Banner 1 - without text goes here</div>
please remember to name your divs. This way you can control the ad afterwards
5. set your application id as a global variable:
var innerActive_aid = 'your_app_id_goes_here';
6. set your mode (test or real ads) in your js file:
var innerActive_test = 'true'; // or false to get production ads
7. Load the ad in your div by using the following js code:
getSmallBannerAd("#banner1","");
Calling this function with the div id reloads the ad. So if you want to load a new ad from your add on a certain event just call this function. This is very useful is I need to refresh an ad after it appears on the screen for too long.
See a full implementation below:
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Sample Widget</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script src="http://cd1.inner-active.com/innerActive.js"></script> <script language="javascript" type="text/javascript" src="basic.js"></script> <link rel="stylesheet" href="basic.css" type="text/css"> <META NAME="Generator" CONTENT="Nokia WRT plug-in for Aptana Studio 2.3.0" /> </head> <body onLoad="javascript:init();"> <div id="banner1">Banner 1 - without text goes here</div> <br/><br/> <div id="banner2">Banner 1 - without text goes here</div> <p>Hello World</p> </body> </html>
basic.js
/*
* JavaScript file
*/
var innerActive_aid = 'CasualMobile_TicTacToe';
var innerActive_test = 'true';
function init()
{
getSmallBannerAd("#banner1","");
getSmallBannerAd("#banner2","showAdText");
}
Download these example widget:
http://mowiwo.com/wp-content/plugins/download-monitor/download.php?id=1
http://mowiwo.com/wp-content/plugins/download-monitor/download.php?id=2













































