Switch from Unity Ads Legacy to Unity Mediation in a published game. How to no lose ads revenue?

Hi there. I have a published game on stores that use Unity Ads (legacy).

  • Players have the published game with Unity Ads legacy.
  • I have in my dev machine a new version of the game with new Unity Mediation implemented.
  • In my Unity dashboard I have Monetization / Settings / Mediation partner as Unity (not mediated).
  • I want to publish this new version on stores.

Questions:

  1. If I switch right now the Mediation partner as Unity Mediation, what will happen to all the players that have the version of the game that use Unity Ads legacy? They can still be able to see ads?

I have made that test and my revenue from ads go to 0 as show here.


Zero revenue from Unity Ads from the published version of the game that uses Unity Ads SDK while I set Mediaton partner as Unity Mediation.

From this official documentation: "Note: Converting placements to ad units is not reversible. This conversion does not affect the live version of your game and ads continue to be served."

  1. How to made the switch from Unity Ads legacy to Unity Mediation without loosing revenue?\

  2. Imagine that I only update the game to google play using Unity Mediation, and ios version still continue with Unity Ads legacy. How to keep ads showing for all of them?

Hi @KaOzz ,

Thanks for reaching out.

Based on the details above it looks like your previous build is using Unity Ads SDK 3.x or below.

These versions are a bit older and create the above issue once Unity Mediation is selected.

Creating a new project on the dashboard with the mediation settings would allow you to overcome this issue, otherwise you’d need to update to Unity Ads 4.x and wait for users to adopt this version before making the change to mediation.

Hope this helps clear things up, more than happy to provide more guidance if you can provide some more details on your game.

Best,
Daniel Ortiz

Hi @Ortiz_Daniel ,

So there are two ways:

  • Build and upload to stores the game using Unity Ads 4.x and wait for users to have this versions. Then build and upload again using Mediation.
  • Creating a new project on dashboard with mediation settings. Import also all of the others settings such a Remote Config, Environments, Analytics custom events, etc and link my new version of the game to this project?

Hi @KaOzz ,

Yes that is correct, both should serve as workarounds.

Out of curiosity, are you able force users to update your game?

If that was the case you would be able to accelerate the time for the first bullet point.

Best,
Daniel Ortiz

I think I will go with the first one (return to Unity Ads but 4.x version) and then upload the game again in one month maybe with Mediation.

But I need to be secure that moving from Unity Ads 4.x to Mediation will no cause the same issue.

I don´t think. I just submit a new version on stores (google play store, app store) and players download the update when they want. Is there a way to force it in that way?

Hi @KaOzz ,

Yes, this is a known issues with 3.x versions and updating to 4.x prior to the switch should mitigate the issue.

To note there are some changes between the versions involving how to call load and show, I recommend you review the documentation prior to making the update.

Force updates can be achieved if you happen to have a server side game, this isn’t common but figured I’d ask in case.

Hope this clears everything up.

Best,
Daniel Ortiz

Hi again @Ortiz_Daniel ,
I’m having some troubles setting up Unity Ads Legacy 4.4.1.

My setup:

  • Unity 2021.3.11f1.
  • Unity Analytics - Gaming Services. I disabled the Unity Legacy Analytics from Project Settings / Services / Legacy Analytics.
  • Unity Advertisement Legacy 4.4.1, installed from Project Settings / Services / Ads. Switched to ON, and then clicked on Install Latest version. (If I try to install from Package Manager, I only see Unity Advertisement Legacy 3.7.5 version).
  • Unity IAP 4.4.1, installed from Project Settings / Services / In-App Purchasing.
  • Remote Config 3.1.3, installed from Package Manager.

Before I installed Unity Advertisement Legacy 4.4.1, I uninstalled Unity Advertisement and Mediation package from Package Manager. I removed my script that implements Unity Mediation, clear all errors. Build the game. Everything ok.

I then have installed Unity Advertisement Legacy 4.4.1 from Project settings / Services / Ads. Added all the logic to have ads again. In editor everything was ok. I see testing ads.

But, when I build to Android i got:

UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules UnityAds-runtime.jar :)UnityAds:) and UnityAds-runtime.jar :)com.unity3d.ads.unity-ads-4.4.1:)
Duplicate class com.unity3d.ads.IUnityAdsInitializationListener found in modules UnityAds-runtime.jar :)UnityAds:) and UnityAds-runtime.jar :)com.unity3d.ads.unity-ads-4.4.1:)
Duplicate class com.unity3d.ads.IUnityAdsLoadListener found in modules UnityAds-runtime.jar :)UnityAds:) and UnityAds-runtime.jar :)com.unity3d.ads.unity-ads-4.4.1:)
Duplicate class com.unity3d.ads.IUnityAdsShowListener found in modules UnityAds-runtime.jar :)UnityAds:) and UnityAds-runtime.jar :)com.unity3d.ads.unity-ads-4.4.1:)

Ok got it working now.
I just deleted Assets/Editor/MediationAdapterDependencies.xml by hand. Hope helps to someone.

4 Likes

That is the solution, after it I recomend to do this too (is what worked for me):

  • Go to the menu Assets>ExternalDependencyManager>AndroidResolver>ForceResolve
  • Go to the menu Assets>ExternalDependencyManager>AndroidResolver>DeleteLibraries
1 Like