Google AdMob

The guide covers the Google AdMob advertisement platform set up.

Installation

Expand the Google AdMob tab, and follow the installation instructions. Let's also described the whole process step by step here.

Admob Plugin

Assuming you do not have yet Google Admob plugin in your project, when you expand the AdMob settings you will be prompted to download and install the Google AdMob plugin.

In case you sure that plugin is installed, but you till see the same UI, press the Refresh button. If that doesn't work as well, please contact us.

Ultimate Admob Add-on

Once the Google AdMob plugin is detected, the system will ask you to download Ultimate Mobile Addon.

There are a few reasons why you need to download an additional package.

  1. I want an initial package to be as clean as possible
  2. The code in add-on is based on 3-rd party SDK. Google Admob in this case.
  3. I can't keep those scripts inside Plugins folder, so Addon has to be located outside of the Plugins folder.

Download an Add-on using this URL.

Please note that you only need a GoogleMobileAdsClient addon.

Once Admob Client addon is installed you may proceed to fill the plugin client settings.

Settings

Feel free to fill setting using the Editor UI. See the screenshot below.

In case you prefer to fill setting using scripting, you can also do this. Please see the code sample below:

using SA.CrossPlatform.Advertisement
...

var settins = UM_GoogleAdsSettings.Instance;
var android = settins.AndroidIds;

android.AppId = "ca-app-pub-6101605888755494~6591356173";
android.BannerId = "ca-app-pub-6101605888755494/8666994797";
android.RewardedId = "ca-app-pub-6101605888755494/4727749786";
android.NonRewardedId = "ca-app-pub-6101605888755494/6084105626";

var ios = settins.IOSIds;
ios.AppId = "ca-app-pub-6101605888755494~3384895876";
ios.BannerId = "ca-app-pub-6101605888755494/5025280606";
ios.RewardedId = "ca-app-pub-6101605888755494/7756628990";
ios.NonRewardedId = "ca-app-pub-6101605888755494/2207545572";

Note: Please note NonRewarded ads type stands for Interstitial Admob ads type.

Consent from European Users

Under the Google EU User Consent Policy, you must make certain disclosures to your users in the European Economic Area (EEA) and obtain their consent to use cookies or other local storage, where legally required, and to use personal data (such as AdID) to serve ads. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR).

Ads served by Google can be categorized as personalized or non-personalized, both requiring consent from users in the EEA. By default, ad requests to Google serve personalized ads, with ad selection based on the user's previously collected data. Google also supports configuring ad requests to serve non-personalized ads. Learn more about personalized and non-personalized ads.

If a user has consented to receive only non-personalized ads, you can configure an AdRequest object with settings UI:

Or using C#

using SA.CrossPlatform.Advertisement
...

var settins = UM_GoogleAdsSettings.Instance;
settins.NPA = false;