SDK Integration | Appodeal Intelligent Ad Mediation

App key

Link your Admob account

Appodeal yields optimal results in cooperation with Admob. To continue, you need to link your Admob account.

If you don't have Admob account, please sign up on Admob.com.

To link your Admob account to Appodeal, use the Chrome extension:

INSTALL EXTENSION


The extension source code is available at https://github.com/appodeal/admob-configurator.

The extension will make two changes in your Admob account. First, it will allow Appodeal to access your Admob reports over API, and second, it will create new ad units on Admob and submit them to Appodeal.

VIDEO TUTORIAL

Integrate Plugin

This plugin contains Appodeal iOS SDK 2.1.10 and Appodeal Android SDK 2.1.11.

The Corona Appodeal Plugin supports currently the Android, iOS and tvOS-based apps.

The detailed process of the plugin implementation is provided by the official documentation of Corona Labs. For your convenience, it is also placed down below. 


You can download latest Corona beta Plugin with beta Appodeal SDKs 2.4.4 inside with major native ads improvements, segment v2 support, GDPR compliance and Parallel bidding support here. Be aware that this version is still beta and may contain bugs.

Basic integration 

To use this beta plugin add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

Make sure to include Base block for a plugin to work correctly. Then you can just comment out unnecessary ad types blocks, so that unneeded adapters are not downloaded and linked to your project.

If for some reason you don't want to show ads from specific ad provider (for the sake of example, let it be Flurry), you can comment or remove it, like this:

Make sure to add Privacy Policy to your app on Google Play that links to Appodeal's Privacy Policy to avoid violating Google Play Developer Distribution Agreement

For Android-based projects

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "android.permission.ACCESS_NETWORK_STATE"
  • "android.permission.WRITE_EXTERNAL_STORAGE"

In addition, if you wish to receive targeted ads in your app and increase your chances for higher revenue, you can include any or all of the following permissions:

  • "android.permission.GET_ACCOUNTS"
  • "android.permission.ACCESS_COARSE_LOCATION"
  • "android.permission.ACCESS_FINE_LOCATION"

For iOS-based projects

If building for iOS, you must bypass App Transport Security (ATS) by adding the following to the plist table of build.settings. For more information on ATS, please see the Managing App Transport Security guide.

Initialize Plugin

Before starting to load ads, you need to initialize the Corona Appodeal plugin, as follows:

Params in the code above is a table with the following Appodeal initialization values:

appKey - string param. Your Appodeal app key. You can find this ID in the section Apps of Appodeal Dashboard.

testMode - boolean param. In the test mode, only test ads will be shown with the 100% fill rate. Your debug data will be written to Logcat. Its value is set to false by default. To enable test mode, put the value true.

autoCacheAds - boolean param. By default, its value is set to true, which means that Appodeal automatically caches ads in the background. Set this value to false to turn it off. If you turn automatic caching off, you must use the appodeal.load() method to manually load ads.

smartBanners - boolean param. Smart banners will automatically adjust their width and height to the device. By default, smart banners are enabled. Set this value to false to disable them.

bannerAnimation - boolean param. Set to true to animate banner transitions (cross-fade when switching banners).

customRules - Table param. Set custom rules to be used with placements (see section Segments and Placements below). This is a table with key-value pairs of data. You can choose key names freely as there are no pre-defined key names. Valid value types are strings, booleans, or numbers.

supportedAdTypes - array. Limits the ad formats you want Appodeal to serve. The Corona Appodeal plugin supports the following ad formats:

  • Static interstitials (“interstital”): full-screen ads, that contain a static image.
  • Video Interstitials (“video”): full-screen ads, that contain a skippable video.
  • Banner (“banner”): rectangular ads that occupy a spot within an app's layout.
  • Rewarded video (“rewardedVideo”): non-skippable video ads that users may choose to watch to get a reward.

By default, all of the supported ad formats will be served. If you want to use only the specific ad formats, put their values after the supportedAdTypes param.

E.g.:

Manage Ads

Show ads

Use this method before the plugin initialization:

Available params:

  • yAlign - String. Vertical alignment of the banner. Valid options: top and bottom.
  • placement - String. The placement you want the ad to be associated with.

E.g.:

Hide ads

Use this method after the plugin initialization:

It will hide a currently displayed banner ad. Does not apply to interstitial or rewarded video ads.

E.g.:

Load ads

By default, Appodeal automatically pre-loads ads in the background. Use this method only if you cache ads manually.

Check if ad was loaded

By default, Appodeal automatically pre-loads ads in the background. Use this method only if you cache ads manually.

Get reward data for a specific placement

To get reward data and notify your users of it before the rewarded video ad is shown, use this method. It returns key-value pairs with the currency type and amount of the reward.

Use callbacks

You can track different events in the ad’s lifecycle, e.g. when an ad was clicked on or closed. To implement them, use the following methods within Ad Listener function:

event.data - Returns key-value pairs relating to rewarded video events, e.g. after a user has completed watching a rewarded video.

event.phase - String. Possible values:

  • "loaded" — Indicates that an ad loaded successfully.
  • "displayed" — Indicates that an ad displayed successfully.
  • "clicked" — Indicates that an ad was clicked/tapped. Please note that this event is not available for video interstitials or rewarded video ads.
  • "closed" — Indicates that an ad was closed. Applies only to static interstitial and video ads.
  • "hidden" — Indicates that a banner ad was hidden.
  • "failed" — Indicates that an ad failed to load.
  • "playbackBegan" — Indicates that a video ad playback has begun.
  • "playbackEnded" — Indicates that a video ad playback has ended.
  • "dataReceived" — Indicates that event data has been received.

event.type - The ad format that caused the event. If event.phase is "failed", indicates the ad format that failed to load.

Transfer User Data

Our SDK provides the transfer of user data for better ad targeting and higher eCPM by the following method:

Available options:

  • age (optional) - Number. The user's age.
  • gender (optional) - String. The user's gender. Valid values include "male", "female", and "other".
  • userId (optional) - String. A unique ID to identify a user.

E.g.:

Segments and Placements

Segments

Segments are used to track statistics for various user categories and to manage ads for these categories. A segment is a fraction of audience unified by filters: e.g. by gender, age or any other parameter known to the app and directed to Appodeal SDK.

You can read more in our Knowledge base.

Once user segments have been created, they can then be analyzed and used to configure ads.

If you have no segments all users will be matched to "default" segment

If you have multiple segments, their order is important. Only the first segment in which filters are matched to the user will apply. All of the rest will be ignored.


Manual Filters allows to groups users by any available characteristics. E.g. you know the sources that directed users to you and you want to track the statistics for such users — group them into a segment.

To create such a segment you have to give our SDK the name or the criterion and an actual value for it. Value can be a table with boolean, numeric or string.

Bought Inapps allows to group users by the fact of purchasing in-apps. This will help you adjust the ads for such users or simply turn it off, if needed.

To make this setting work correctly, please submit the purchase info via Appodeal SDK.

Placements

Placements allow you to separate ads impressions by places where it was shown.

You can read more in our Knowledge base

To show an ad with placement, you have to call show method like this:

To check if ad can be shown for the specific placement use:

You can use "default" placement or create new in application settings.

If you have no placement, or call Appodeal.show with placement that do not exist or without placement in your segment, the impression will be tagged with "default" placement and its settings will be applied.

It's Done

You are ready to use Appodeal. If you have any questions, check out our FAQ or contact the support team.

Third-party SDKs


NetworkAndroid SDK versioniOS SDK version
Adcolony3.3.03.3.0
Admob11.4.17.27.0
Amazon Ads5.8.1.12.2.15.1
Applovin7.8.54.3.1
Chartboost7.0.17.0.3
Facebook Audience Network4.27.04.27.2
Flurry8.2.08.0.1
Inmobi7.0.26.2.1
IronSource6.7.66.7.5
MillenialMedia6.4.06.6
Mobvista8.3.73.3.2
myTarget4.7.24.7.2
Mopub4.15.04.19.0
Ogury2.1.15-
SmaatoAPI8.1.4
Startapp3.6.93.5.1
Tapjoy11.11.111.11.0
Unity Ads2.1.22.1.1
Vungle5.3.25.3.2
Yandex Mobile Ads2.622.7.2

Changelog

1.3.7 (18 January, 2018)

  • Appodeal iOS SDK updated to 2.1.10
  • Appodeal Android SDK updated to 2.1.11
  • Appodeal Corona Modular Plugin released
  • Fixed getRewardParameters method
  • Fixed android verbose logging

1.3.6 (28 October, 2017)

  • Appodeal iOS SDK updated to 2.1.7
  • Appodeal Android SDK updated to 2.1.7
  • Added failToPresent callbacks (show offline issue)

1.3.5 (10 October, 2017)

  • childDirectedTreatment method added
  • getRewardParameters method added
  • Appodeal iOS SDK updated to 2.1.4
  • Appopdeal Android SDK updated to 2.1.4

1.3.3 (08 September, 2017)

  • Appodeal iOS SDK updated to 2.1.3
  • Appopdeal Android SDK updated to 2.1.1

1.3.1 (24 August, 2017)

  • Appodeal iOS SDK updated to 2.1.0
  • Appopdeal Android SDK updated to 2.1.0
  • Modified isLoaded to handle placements

1.3.0 (07 June, 2017)

  • Appodeal iOS SDK updated to 2.0 pre-release
  • Appopdeal Android SDK updated to 2.0 pre-release

1.2.2 (08 May, 2017)

  • Appodeal Android SDK updated to 1.15.9

1.2.1 (19 December, 2016)

  • Appodeal Android SDK updated to 1.15.8
  • Appodeal iOS SDK updated to 1.3.6

1.2.0 (23 November, 2016)

  • Appodeal Android SDK updated to 1.15.7
  • Appodeal iOS SDK updated to 1.3.4
  • Amazon platform added
  • Android code refactored
  • Added supportedAdTypes to init()
  • autoCache method added
  • load functionality added
  • Placements added
  • Added extra init() options and setUserDetails() method
  • Added setCustomRules method and locationTracking method

1.1.2 (16 October, 2016)

  • iOS code refactored
  • iOS SDK updated to 1.3.0
  • 1.1.1 (09 September, 2016)
  • isLoaded method added

1.0 (01 July, 2016)

  • Appodeal Corona Plugin released
  • Appodeal Android SDK 1.14.15 added
  • Appodeal iOS SDK 1.0 added
  • Fix incorrect error message
  • Fix rewardAmount not being passed to the event.data table