In-App Ads
Implementing In-App Ads
Overview
This guide explains the full integration process for implementing AdMob & AppLovin mediation ads in your Unity project using Noctua SDK.
Prerequisites
To integrate Mediation Ads with Noctua SDK, ensure the following requirements:
- Noctua SDK integrated in your project
- Required Ad SDKs installed:
SDK | Download & Integration Guide |
---|---|
AdMob | AdMob Unity SDK Installation Guide |
AppLovin MAX | AppLovin MAX Unity SDK Installation Guide |
Installing via the Noctua Menu
To install using the Noctua Integration Manager:

- Open the Noctua menu in the Unity toolbar.
- Select Noctua Integration Manager.
- Click the Install button.
⚠️ Troubleshooting:
If the Unity Editor is not compiling:
- Switch to another application, then return to Unity.
- If that doesn’t resolve the issue, try restarting the Unity Editor.
Supported Ad Formats
Format | Mediation Support |
---|---|
Banner | AdMob / AppLovin |
Interstitial | AdMob / AppLovin |
Rewarded | AdMob / AppLovin |
Rewarded Interstitial | AdMob Only |
Configuration
Note
The iaaEnabled
flag should be enabled to activate the In-App Ads (IAA) feature.
However, this is already configured by default in the noctuagg.json
file provided by the Noctua Team. You don't need to change this setting unless specifically instructed.
"noctua": {
"iaaEnabled": true
}
Preprocessor Symbols
We provide preprocessor symbols to manage conditional compilation between AdMob and AppLovin SDKs in your project.
You don't need to add these symbols manually in:Unity > Project Settings > Player > Scripting Define Symbols
we already make this automatically added
UNITY_ADMOB
UNITY_APPLOVIN
Setup App ID
The App ID for AdMob and SDK Key for AppLovin will be provided by the Noctua Team.
You just need to input them in the available settings menu — no need to generate your own.
For detailed setup instructions, refer to the official guides below:
- AdMob: Set up App ID Guide
- AppLovin: In Unity Editor, select
AppLovin
>Integration Manager
for setup.
More details: AppLovin MAX Unity Guide
Showing Ads
Note
You don't need to set Ad Unit IDs manually in your project.
All Ad Unit IDs are managed and provided remotely via Remote Config handled by the Noctua SDK.
Banner Ad:
// Banner Ad - Create and Show
#if UNITY_ADMOB
Noctua.IAA.CreateBannerViewAdAdmob(AdSize.Banner, AdPosition.Top);
#endif
#if UNITY_APPLOVIN
Noctua.IAA.CreateBannerViewAdAppLovin(Color.white, MaxSdkBase.BannerPosition.BottomCenter);
#endif
Noctua.IAA.ShowBannerAd();
// Hide Banner Ad
Noctua.IAA.HideBannerAd();
// Additional AppLovin Banner Functions
#if UNITY_APPLOVIN
// Create AppLovin banner with color and position
Noctua.IAA.CreateBannerViewAdAppLovin(Color color, MaxSdkBase.BannerPosition bannerPosition);
// Hide AppLovin banner
Noctua.IAA.HideBannerAppLovin();
// Destroy AppLovin banner
Noctua.IAA.DestroyBannerAppLovin();
// Set AppLovin banner width
Noctua.IAA.SetBannerWidth(int width);
// Get AppLovin banner position
Noctua.IAA.GetBannerPosition();
// Stop auto-refresh for AppLovin banner
Noctua.IAA.StopBannerAutoRefresh();
// Start auto-refresh for AppLovin banner
Noctua.IAA.StartBannerAutoRefresh();
#endif
// Show Interstitial Ad
Noctua.IAA.ShowInterstitial();
// Show Rewarded Ad
Noctua.IAA.ShowRewardedAd();
// Show Rewarded Interstitial Ad (AdMob Only)
#if UNITY_ADMOB
Noctua.IAA.ShowRewardedInterstitialAd();
#endif
Interstitial Ad:
Noctua.IAA.ShowInterstitial();
Rewarded Ad:
Noctua.IAA.ShowRewardedAd();
Rewarded Interstitial Ad (AdMob only):
#if UNITY_ADMOB
Noctua.IAA.ShowRewardedInterstitialAd();
#endif
Handle Ad Events
You can handle various ad events provided by the Noctua SDK for both AdMob and AppLovin.
// Common Ad Events
Noctua.IAA.OnInitialized += () => Debug.Log("Ad Initialized")
Noctua.IAA.OnAdDisplayed += () => Debug.Log("Ad Displayed");
Noctua.IAA.OnAdClosed += () => Debug.Log("Ad Closed");
Noctua.IAA.OnAdClicked += () => Debug.Log("Ad Clicked");
Noctua.IAA.OnAdFailedDisplayed += () => Debug.Log("Ad Failed");
// AdMob Specific Events
#if UNITY_ADMOB
Noctua.IAA.AdmobOnUserEarnedReward += (reward) => {
Debug.Log("On User Earned Reward Interstitial Ads in Main Screen");
};
Noctua.IAA.AdmobOnAdRevenuePaid += (adValue, responseInfo) => {
Debug.Log("On Ad Revenue Paid Interstitial Ads in Main Screen");
};
#endif
// AppLovin Specific Events
#if UNITY_APPLOVIN
Noctua.IAA.AppLovinOnUserEarnedReward += (reward) => {
Debug.Log("On User Earned Reward Interstitial Ads in Main Screen");
};
Noctua.IAA.AppLovinOnAdRevenuePaid += (adInfo) => {
Debug.Log("On Ad Revenue Paid Interstitial Ads in Main Screen");
};
#endif
Note
Ad Revenue Tracking is already handled automatically by Noctua SDK. No implementation is needed on your side — this data is tracked and sent directly to Noctua's analytics system.
Debugging Tools
Noctua.IAA.ShowCreativeDebugger(); //Only for AppLovin
Noctua.IAA.ShowMediationDebugger();
These debugging tools help you validate integration and visualize ad placements during development builds.
Additional Settings & Advanced Usage
For more details such as advanced settings, custom configurations, or accessing other available functions from AdMob and AppLovin SDKs, you can refer directly to their official documentation:
- AdMob Documentation: https://developers.google.com/admob/unity
- AppLovin MAX Documentation: https://developers.applovin.com/en/max/unity/overview/integration
We recommend checking the official documentation for any specific feature or advanced integration that is not covered in this guide.