How to convert to Lion Ads

If you’re using your own Ad Manager class and not Lion Ads, this document will guide you through an easy migration process to Lion Ads.

How Does Lion Ads Work?

  • Lion Ads sends analytic events by using Lion Analytics automatically.

  • Lion Ads loads events and manages MaxSdkCallbacks automatically.

  • Lion Ads is not an ad management system on its own. Instead, it complements your existing ad management setup by handling SDK-specific requirements and simplifying the integration of your ad rules and logic.

For more information please see Lion Ads package documentation.

Replacing MaxSDK with Lion Ads

If you’re using your own Max SDK functions or callback methods, please replace them with the corresponding Lion Ads implementations.

Preparation

  • Make sure you've added necessary Ad Unit IDs on Lion Ads Settings panel. (Please see, Lion Ads page)

  • Make sure you’ve removed all ad load methods from your MaxSdkCallbacks events.

  • Also, ensure that you’ve removed all ad-related events (such as LionAnalytics events) from the MaxSdkCallback events.

    • If you still need to send data to another source (for example, Firebase), you can keep those events — we already trigger LionAnalytics events automatically for you. (If they are enabled on Lion Ads Settings -> )

Replacing Show Methods

If you have a Show Interstitial ad method like this, remove it:

if (MaxSdk.IsInterstitialReady(maxInterstitialAdId))
        {
            MaxSdk.ShowInterstitial(maxInterstitialAdId);
        }

Use this instead:

LionAds.TryShowInterstitial(
            placement, 
            onClosed: null //On Closed Method Here, 
            additionalData: null //Additional Data Here)

You don't need to check if ad is loaded or not. Also, you don't need to check if ad load is fail or not. This method returns a boolean, if it can't show an interstitial it'll return false.

onClosed: You should add your OnClosed function here instead of using MaxSDK's callbacks.

Note: If required there is LionAds.IsInterstitialReady() method.

Additional Documents

Lion Ads Code Integration

CPM Floor Ads Bidding

Last updated