Banner ads are classic static banners, which are usually located at the bottom or top of the screen.

Appodeal supports traditional 320x50 banners, tablet 728x90 ones, and adaptive banners (for Admob only) that adjust to the size and orientation of the device.

You can display only one banner view on the screen.

1. Initialize Banner

1. Import the namespaces:

using AppodealAds.Unity.Api;
using AppodealAds.Unity.Common;
2. Add the following code within the Start() method of your main scene’s MonoBehavior: 
Appodeal.initialize("YOUR_APPODEAL_APP_KEY", Appodeal.BANNER, consentValue);

Initialization method requires 3 parameters:

  • appKey - appKey is generated when you add an application to Appodeal.
  • adType - Ad types can be combined using "|" operator. For example, Appodeal.INTERSTITIAL | Appodeal.BANNER.
  • consentValue - is boolean, with 'false' meaning that the user declines to give the consent. Read our guide on collecting consent here.

By default, auto caching is enabled: Appodeal SDK starts to load banner right away after the initialization method is called. The next banner ad starts to load after the previous one was shown.

2. Display Banner

Banner ads are refreshed every 15 seconds automatically by default. To display banner, you need to call the following code:; // Display banner at the bottom of the screen; // Display banner at the top of the screen; // Display banner at the left of the screen; // Display banner at the right of the screen

2.1. Display Banner at Custom Position

Appodeal.BANNER_VIEW is a banner ad that can be moved along the axis to the desired position.

To use it first initialize Appodeal SDK with the Appodeal.BANNER_VIEW ad format.

To show Appodeal.BANNER_VIEW use the following code:

Appodeal.showBannerView((int) yPosition, (int) xPosition, (string) placement);
For xPosition and yPosition use custom int value or constants:

  • Appodeal.BANNER_HORIZONTAL_SMART — to use the full-screen width;
  • Appodeal.BANNER_HORIZONTAL_CENTER — to center a banner horizontally;
  • Appodeal.BANNER_HORIZONTAL_RIGHT — to align a banner to the right;
  • Appodeal.BANNER_HORIZONTAL_LEFT — to align a banner to the left;

For yPosition you can use custom int value or constants:

  • Appodeal.BANNER_TOP — to align a banner to the top of the screen;
  • Appodeal.BANNER_BOTTOM — to align a banner to the bottom of the screen.

To set your custom width and height, you can use the constants of The Unity’s Screen.currentResolution.width and Screen.currentResolution.height with a constant value.

To hide Appodeal.BANNER_VIEW use the following code:


3. Check if Banner is Loaded


4. Hide Banner


5. Destroy Hidden Banner

To free memory from hidden banner call the code below:


6. Banner Placements

Appodeal SDK allows you to tag each impression with different placement. For using placements you need to create placements in Appodeal Dashboard. Read more about placements.

To show an ad with placement, you have to call show method like this in your activity:, “placementName”);

If the loaded ad can’t be shown for a specific placement, nothing will be shown. 

You can configure your impression logic for each placement.

If you have no placements, or call with placement that do not exist, the impression will be tagged with 'default' placement and its settings will be applied.


Placement settings affect ONLY ad presentation, not loading or caching.

7. Banner Callbacks

The callbacks are used to track different events in the lifecycle of an ad, e.g. when an ad was clicked on or closed. To implement them, you need to follow three steps:

1. Extend your class with IBannerAdListener:

YourClassName : IBannerAdListener;
2. Then call the following method:
3. Now you can use the following callback methods within your public class:
#region Banner callback handlers

// Called when a banner is loaded (height flag shows loaded banner's height, precache flag shows if the loaded ad is precache
public void onBannerLoaded(int height, bool precache) 
	print("banner loaded"); 

// Called when banner failed to load
public void onBannerFailedToLoad() 
	print("banner failed"); 

// Called when banner is shown
public void onBannerShown() 
	print("banner opened"); 

// Called when banner is clicked 
public void onBannerClicked() 
	print("banner clicked"); 

// Called when banner is expired and can not be shown
public void onBannerExpired() 
	print("banner expired");  


All callbacks are called on native main threads that do not match the main thread of the Unity. If you need to receive callbacks in the main Unity thread follow our Callback Usage Guide.

8. Get Predicted eCPM

This method returns expected eCPM for a currently cached advertisement. The amount is calculated based on historical data for the current ad unit:


9. Advanced Banner Integration

Appodeal provides a number of settings that enable you to control the format of banner ads.

9.1. Cache Banner Manually

To disable automatic caching for banners use the code below before the SDK initialization:

Appodeal.setAutoCache(Appodeal.BANNER, false);
To cache banners use:

9.2. Enable 728x90 Banners

To enable 728*90 banner use the following method before initialization:


9.3. Disable Banner Refresh Animation

To disable banner refresh animation use the following method before initialization:


9.4. Disable Banner Background (iOS Only)

To disable banner background use the following method before Appodeal SDK initialization:


9.5. Smart Banners

Smart banners are the banner ads which automatically fit the screen size. Using them helps to deal with the increasing fragmentation of the screen sizes on different devices. In the Appodeal SDK the smart banners are enabled by default. To disable them, use the following method before initialization :