Banner ads use a small part of the screen to entice users to "click through" to a richer, full-screen experience such as a website or an app store page.


The banner ad is represented as a GoogleMobileAdBanner object. The following code snippet will show how to create a banner object with the specific anchor and size.

GoogleMobileAdBanner banner;
banner = GoogleMobileAd.CreateAdBanner(TextAnchor.UpperLeft, GADBannerSize.BANNER);


Anchoring supports all TextAnchor constants.

The following ad formats are supported:

Size (WxH) Description Availability GADBannerSize
320x50 Standard Banner Phones and Tablets BANNER
320x100 Large Banner Phones and Tablets LARGE_BANNER
300x250 IAB Medium Rectangle Phones and Tablets MEDIUM_RECTANGLE
468x60 IAB Full-Size Banner Tablets FULL_BANNER
728x90 IAB Leaderboard Tablets LEADERBOARD
See table Smart Banner Phones and Tablets SMART_BANNER

Warning: The SDK will request whatever size the requesting AdView was instantiated with. If there isn't enough space on the device's screen to display the ad, nothing will be shown.


You may also specify the position of banner instead of use Anchors.

GoogleMobileAdBanner banner;
banner = GoogleMobileAd.CreateAdBanner(300, 100, GADBannerSize.BANNER);


After banner, an object is created. An ad request will start, and as soon as a banner content is read, the banner will appear on the screen.

If you want to prevent the banner to appear on the screen right after the content is loaded you can set ShowOnLoad flag to false. 

banner.ShowOnLoad = false;


The banner will dispatch the following actions:

Action<GoogleMobileAdBanner> OnLoadedAction 			{ get; set; }
Action<GoogleMobileAdBanner> OnFailedLoadingAction 	    { get; set; }
Action<GoogleMobileAdBanner> OnOpenedAction 			{ get; set; }
Action<GoogleMobileAdBanner> OnClosedAction 			{ get; set; }
Action<GoogleMobileAdBanner> OnLeftApplicationAction    { get; set; }


For example, a code snippet below shows how to find out when  a user clicked in the banner ad

GoogleMobileAdBanner banner;
banner = GoogleMobileAd.CreateAdBanner(TextAnchor.UpperLeft, GADBannerSize.BANNER);
banner.OnOpenedAction += OnOpenedAction;

void OnOpenedAction (GoogleMobileAdBanner banner) {
	banner.OnOpenedAction -= OnOpenedAction;
	Debug.Log("Banner was just clicked");



public interface GoogleMobileAdBanner  {

	//  Methods
	void Hide();
	void Show();
	void Refresh();
	void SetBannerPosition(int x, int y);
	void SetBannerPosition(TextAnchor anchor);

	//  Get / Set

	int id {get;}
	int width {get;}
	int height {get;}

	bool IsLoaded {get;}
	bool IsOnScreen {get;}
	bool ShowOnLoad{get; set;}

	GADBannerSize size {get;}
	TextAnchor anchor {get;}

	//  Actions

	// Called when an ad request loaded an ad. This is a good opportunity to add 
	// this view to the hierarchy if it has not been added yet. If the ad 
	// was received as a part of  the server-side auto refreshing, 
    //you can examine the hasAutoRefreshed property of the view.
	Action<GoogleMobileAdBanner> OnLoadedAction 			{ get; set; }

	//Called when an ad request failed. Normally this is because no network connection 
	//was available or no ads were available (i.e. no fill). If the error was received 
	//as a part of the server-side auto refreshing, you can examine the hasAutoRefreshed 
    //property of the view.
	Action<GoogleMobileAdBanner> OnFailedLoadingAction 	{ get; set; }

	// Called just before presenting the user a full screen view, such as a browser, 
	// in response toclicking on an ad. Use this opportunity to stop animations, 
	// time sensitive interactions, etc.Normally the user looks at the ad, 
    //dismisses it, and control returns to your application by
	Action<GoogleMobileAdBanner> OnOpenedAction 			{ get; set; }

	// Called just after dismissing a full screen view. Use this opportunity 
	// to restart anything you may have stopped as part of adViewWillPresentScreen:.
	Action<GoogleMobileAdBanner> OnClosedAction 			{ get; set; }

	// Called just before the application will background or terminate because 
	// the user clicked on an ad that will launch another application (such as the App Store). 
	// The normal UIApplicationDelegate methods, like applicationDidEnterBackground:, 
	// will be called immediately before this.
	Action<GoogleMobileAdBanner> OnLeftApplicationAction  { get; set; }



Full API us example can be found in the plugin example scene.