Skip to main content

Ad revenue (ILRD)

Impression Level Revenue Data (ILRD) lets GameAnalytics receive the revenue of every single ad impression directly from your ad mediation SDK, so ad revenue shows up in your dashboards connected to player events and metrics. For a general overview see Ad Monetization (ILRD).

warning

ILRD is supported on iOS and Android only. The subscribe calls below do nothing on other platforms (and only log a message in the Unity editor).

What you'll need

  • The GameAnalytics Unity SDK installed and initialized
  • Your ad mediation SDK installed, configured and serving ads correctly
  • The GA_ILRD_UNITY.unitypackage imported into your project — download the latest version (or a specific one from https://download.gameanalytics.com/unity/[VERSION]/GA_ILRD_UNITY.unitypackage, also attached to each GitHub release). It is shipped separately and is not included in the main SDK package, the UPM package or the GitHub repository.

Setup

  1. Import GA_ILRD_UNITY.unitypackage. On compile the SDK detects which supported ad SDKs are present in your project and includes only the matching integrations. If you add your mediation SDK afterwards, let Unity recompile to pick it up.

  2. Initialize GameAnalytics and your mediation SDK as you normally would.

  3. Call the subscribe method for your network once, after both are initialized — for example in Start() of a startup script. Every impression the network reports is then forwarded to GameAnalytics as an ad revenue event.

Without step 3 no ad revenue is sent, even though the integration is compiled in.

Supported networks

Find your network below and use its call in step 3. The per-network sections that follow show the full snippet.

NetworkSubscribe call
Unity LevelPlay (8.10.1+, incl. 9.x)GameAnalyticsILRD.SubscribeLevelPlayImpressions()
IronSource (legacy plugin)GameAnalyticsILRD.SubscribeIronSourceImpressions()
AppLovin MAXGameAnalyticsILRD.SubscribeMaxImpressions()
AdMobGameAnalyticsILRD.SubscribeAdMobImpressions(adUnitId, ad) (per ad object, see below)
FyberGameAnalyticsILRD.SubscribeFyberImpressions()
TopOnGameAnalyticsILRD.SubscribeTopOnImpressions()
AequusGameAnalyticsILRD.SubscribeAequusImpressions()
HyperBidGameAnalyticsILRD.SubscribeHyperBidImpressions()

Unity LevelPlay

Requires Unity LevelPlay 8.10.1 or newer (including the 9.x plugin) and GameAnalytics Unity SDK 8.1.0 or newer. Subscribe once, after initializing LevelPlay:

void Start()
{
// ... initialize GameAnalytics and LevelPlay
GameAnalyticsILRD.SubscribeLevelPlayImpressions();
}

If your project still uses the legacy IronSource plugin (the IronSource class), use GameAnalyticsILRD.SubscribeIronSourceImpressions() instead.

AppLovin MAX

void Start()
{
// ... initialize GameAnalytics and MAX
GameAnalyticsILRD.SubscribeMaxImpressions();
}

AdMob

AdMob has no mediation-wide impression callback, so you subscribe each ad object individually after loading it. Overloads exist for BannerView, InterstitialAd, RewardedAd, RewardedInterstitialAd and AppOpenAd:

RewardedAd.Load(adUnitId, adRequest, (RewardedAd ad, LoadAdError error) =>
{
if (error != null || ad == null)
{
return;
}
GameAnalyticsILRD.SubscribeAdMobImpressions(adUnitId, ad);
});

Fyber, TopOn, Aequus, HyperBid

Same pattern — one call after both SDKs are initialized:

void Start()
{
// ... initialize GameAnalytics and the mediation SDK
GameAnalyticsILRD.SubscribeFyberImpressions(); // Fyber
// GameAnalyticsILRD.SubscribeTopOnImpressions(); // TopOn
// GameAnalyticsILRD.SubscribeAequusImpressions(); // Aequus
// GameAnalyticsILRD.SubscribeHyperBidImpressions(); // HyperBid
}