Google DFP with Appcelerator Titanium

I’ve been using Appcelerator’s Titanium to streamline mobile development for Android and iPhone. They have a module for doing Admob ads but there Double Click for Publishers (DFP) module is only available to enterprise customers.

However, as long as you don’t need the DFP’s multiple sizes and just want custom campaigns with Admob backfill, you can use their current free Admob module.

Initial set up
1) Get Titanium’s Admob module here:
https://marketplace.appcelerator.com/apps/795?1803788439

2) In DFP go to your inventory and create mobile ad units for each size of ad you want to server in your app.

3) In your app set the publisherId to the id of your DFP adunit (normally it’s the publisher id from Admob)

var Admob = require('ti.admob');
var adunit = '/123/App320'; //Get this from your inventory in (2)
var adview = Admob.createView({
adBackgroundColor:'black',
primaryTextColor:'blue',
secondaryTextColor:'green',
publisherId:adunit,
width:320,
height:50,
bottom:0
});

Admob backfill
4) If you haven’t already set up an Admob account at http://www.admob.com and create your app to backfill DFP with.

5) Go to your orders and create a new order and line item:
– Enter the inventory sizes you want to use in your apps
– Since you probably just want to back fill almost always, set an end time far in the future
– Likewise set the quantity of your impressions to really high
– Set a low non-zero CPM value so that your ads actually show up
– When you click save, if you need to check “overbook” then do, it just means no one is viewing your ads yet

6) Add the inventory items you created in DFP previously (2)

7) For each ad size add an Admob creative entering the publisher id you created in (4)

Custom campaigns (optional)
If you want to put your own ads in or run custom campaigns for clients

8) Create a new line item in DFP. This can be under the same order you created before since you can use a different CPM value, or you can create a new order to keep things separate.

9) Again select the ad sizes and and adunits you want to use

10) Set the CPM, impressions and time period that your client is paying for

11) Add a new creative with the images or HTML that you want to display

* Note, unlike backfill with Adsense, in backfill with Admob DFP doesn’t know how much advertisers are bidding, so if you run custom campaigns you’re competing with the manual price you entered in (5), not the price that Admob advertisers are paying. However normally this isn’t an issue since if you’re doing custom campaigns they are hopefully bidding quite a bit higher than Admob for it to be with it. See the link below:

https://support.google.com/dfp_premium/bin/answer.py?hl=en&answer=2549435


Reader Comments

  1. hi,
    Am new to Titanium. I am trying to add Google DFP in my project. when i run project it is showing admob module is added but am not seeing any ads banners displayed. I am using jon alter’s admob module – admob module 2.0.1 for ios and android, Titanium version 3.1.1. The link which you have given in your post is not working – https://marketplace.appcelerator.com/apps/795?1803788439
    I’d appreciate if you could give me the correct link or suggest me a solution.

    Thanks in advance

    Harsha Kumar,
    Vibrant Infosystems

  2. Hey,
    I can’t get this to work really, would you mind making a video or something like that?

    Best Regards

Write a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.