How I Monetized My Unity Flappy Bird Game with AdMob (Banner, Interstitial & Rewarded)

Unity AdMob Guide

If you made a simple Unity game, like Flappy Bird, and want to earn money from it, AdMob is one of the easiest and most reliable ad networks to start with.

Table of Contents

  1. What ad types to use and when
  2. Step-by-step setup (AdMob + Unity plugin)
  3. Code: Banner + Interstitial + Rewarded
  4. Testing safely
  5. Monetization strategy
  6. Optimization tips

1) What ad types to use and when

  • Banner: persistent small ad at top/bottom, low friction; good for continuous display during gameplay.
  • Interstitial: full-screen ads at natural breaks, medium earnings; show sparingly.
  • Rewarded: opt-in video ads giving in-game rewards, best engagement and highest eCPM.
Tip: Rewarded ads work best when placed where players want progress or bonuses.

2) Step-by-step setup (AdMob → Unity)

  1. Create AdMob account and register your app with its Android package name.
  2. Create ad units: Banner, Interstitial, Rewarded — copy their IDs.
  3. Download & import the Google Mobile Ads Unity plugin.
  4. Set App ID in Unity → Google Mobile Ads → Settings.
  5. Use test ad IDs while developing to avoid invalid impressions.
Download Unity SDK

3) Unity Code Examples for Ads

Banner Ads

Banner Ad Example

Banner ads are small rectangular ads shown at the top or bottom of the screen.

using GoogleMobileAds.Api;
using UnityEngine;

public class BannerAds : MonoBehaviour
{
    private BannerView bannerView;

    void Start()
    {
        string adUnitId = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx";
        bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom);
        AdRequest request = new AdRequest.Builder().Build();
        bannerView.LoadAd(request);
    }
}
      

Interstitial Ads

Interstitial Ad Example

Interstitial ads are full-screen ads displayed at natural breaks in your game.

using GoogleMobileAds.Api;
using UnityEngine;

public class InterstitialAds : MonoBehaviour
{
    private InterstitialAd interstitial;

    void Start()
    {
        string adUnitId = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx";
        interstitial = new InterstitialAd(adUnitId);
        AdRequest request = new AdRequest.Builder().Build();
        interstitial.LoadAd(request);
    }

    public void ShowAd()
    {
        if(interstitial.IsLoaded())
        {
            interstitial.Show();
        }
    }
}
      

Rewarded Ads

Rewarded Ad Example

Rewarded ads let players earn rewards like coins or power-ups by watching an ad.

using GoogleMobileAds.Api;
using UnityEngine;

public class RewardedAds : MonoBehaviour
{
    private RewardedAd rewardedAd;

    void Start()
    {
        string adUnitId = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx";
        rewardedAd = new RewardedAd(adUnitId);
        rewardedAd.OnUserEarnedReward += HandleUserEarnedReward;
        AdRequest request = new AdRequest.Builder().Build();
        rewardedAd.LoadAd(request);
    }

    public void ShowRewardedAd()
    {
        if(rewardedAd.IsLoaded())
        {
            rewardedAd.Show();
        }
    }

    private void HandleUserEarnedReward(object sender, Reward args)
    {
        Debug.Log("User earned reward: " + args.Amount);
    }
}
      

4) Testing — the safe way

  • Always use Google test ad IDs.
  • Monitor Unity console logs for load errors.
  • Do not click your own live ads; this can suspend your account.

5) Monetization strategy

  • Banner: always visible at bottom.
  • Interstitial: show at natural breaks, cap frequency.
  • Rewarded: place where users want extra progress.

6) Analytics & growth

Track impressions, eCPM, revenue, fill rate, ARPDAU, retention, and session length. Use Google Analytics for Firebase to optimize placement and rewards.

FAQ

  • Q: Can I show full-screen ads at app open?
    A: No, it violates AdMob rules.
  • Q: Why don’t interstitials appear even though banners work?
    A: They require time to load and test IDs must be used.
  • Q: Should I use mediation?
    A: Yes, it increases fill and eCPM.

Post a Comment

Previous Post Next Post