-
Notifications
You must be signed in to change notification settings - Fork 127
setOptions
appfeel edited this page Dec 23, 2014
·
26 revisions
Set the options to start displaying ads:
- options: setup options (see options).
- success: success callback.
- failure: failure callback.
A JSON object whith the following fields:
- publisherId: (Required) Your publisher id code from your AdMob account. You can get it from AdMob.
-
interstitialAdId: (Optional) Your interstitial id code from your AdMob account. Defaults to
publisherId
. - tappxIdiOS: (Optional) Your tappx id for iOS apps. You can get it from tappx. It is also used to backfill your lost inventory (when there are no Admob ads available).
- tappxIdAndroid: (Optional) Your tappx id for Android apps. You can get it from tappx. It is also used to backfill your lost inventory (when there are no Admob ads available).
- tappxShare: (Optional) If any of tappxId is present, it tells the percentage of traffic diverted to tappx. Defaults to 50% (0.5).
-
bannerAtTop: (Optional) Indicates whether to put banner ads at top when set to true or at bottom when set to false. Default
false
. -
adSize: (Optional) Indicates the size of banner ads.
Available values are (see Google Docs for more info):- admob.AD_SIZE.BANNER: 320x50. Standard Banner (Phones and Tablets).
- admob.AD_SIZE.IAB_MRECT: 300x250. IAB Medium Rectangle (Phones and Tablets).
- admob.AD_SIZE.IAB_BANNER: 468x60. IAB Full-Size Banner (Tablets).
- admob.AD_SIZE.IAB_LEADERBOARD: 728x90. IAB Leaderboard (Tablets).
- admob.AD_SIZE.SMART_BANNER: (See table) Smart Banner (Phones and Tablets).
-
overlap: (Optional) Allow banner overlap webview. Default
false
. -
offsetStatusBar: (Optional) Set to true to avoid ios7 status bar overlap. Default
false
. -
isTesting: (Optional) Set to true for receiving test ads (do not test with real ads as your account will be banned). Default
false
. - adExtras: (Options) A JSON object with additional {key: value} pairs (see Google Docs for more info).
-
autoShowBanner: (Optional) Auto show banners ad when available (
admob.events.onAdLoaded
event is called). Defaulttrue
. -
autoShowInterstitial: (Optional) Auto show interstitials ad when available (
admob.events.onAdLoaded
event is called). Defaultfalse
.
Example (those are also the default options, except for tappxId's which are empty by default):
{
publisherId: "ca-app-pub-8440343014846849/3119840614",
interstitialAdId: "ca-app-pub-8440343014846849/4596573817",
tappxIdiOs: "/120940746/Pub-2702-iOS-8226",
tappxIdAndroid: "/120940746/Pub-2700-Android-8171",
tappxShare: 0.5,
adSize: admob.AD_SIZE.SMART_BANNER,
bannerAtTop: false,
overlap: false,
offsetStatusBar: false,
isTesting: false,
adExtras : {},
autoShowBanner: true,
autoShowInterstitial: true
}