> For the complete documentation index, see [llms.txt](https://lionstudios.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lionstudios.gitbook.io/lionsdk-1.x-legacy-docs/ads/how-to-convert-to-lion-ads.md).

# 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.

{% hint style="info" %}
For more information please see [Lion Ads](/lionsdk-1.x-legacy-docs/ads.md) package documentation.
{% endhint %}

### 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](/lionsdk-1.x-legacy-docs/ads.md) 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 -> [Fire Analytic Events](#user-content-fn-1)[^1])

#### Replacing Show Methods

{% tabs %}
{% tab title="Interstitial Sample" %}
If you have a Show Interstitial ad method like this, remove it:

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

Use this instead:

<pre class="language-csharp"><code class="lang-csharp"><strong>LionAds.TryShowInterstitial(
</strong>            placement, 
            onClosed: null //On Closed Method Here, 
            additionalData: null //Additional Data Here)
</code></pre>

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.
{% endtab %}

{% tab title="Rewarded Sample" %}
If you have a Show Rewarded ad method like this, remove it:

```csharp
if (MaxSdk.IsRewardedReady(maxRewardedAdId))
        {
            MaxSdk.ShowRewardedAd(AdUnitID, placement);
        }
```

Use this instead:

```csharp
LionAds.TryShowRewarded(
            placement, 
            onRewarded: null //OnRewarded Function Here, 
            onClosed: null //OnClosed Function Here,
            reward: null //Reward object for analytic reasons, 
            additionalData: null //Add your additionalData 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 a rewarded it'll return false.

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

`onRewarded` : You should add your OnRewarded function here instead of using MaxSDK's callbacks.

Note: If required there is `LionAds.IsRewardedReady()` method.
{% endtab %}

{% tab title="Banner Sample" %}
If you have a Show Banner ad method like this, remove it:

```csharp
if (!isBannerReady)
    {
        LoadBannerAd();
    }
else
    {
        MaxSdk.ShowBanner(AdUnitId);
    }
```

Use this instead:

<pre class="language-csharp"><code class="lang-csharp"><strong>LionAds.ShowBanner();
</strong>
//To Hide use this:
LionAds.HideBanner();
</code></pre>

Is Loaded Method: `LionAds.IsBannerReady()`
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Please make sure to **remove any unnecessary MaxSDK callbacks and LionAnalytics events** to avoid duplicate event triggers.\
Using **LionAds callbacks** is essential for both proper functionality and accurate analytics tracking.
{% endhint %}

{% hint style="danger" %}
Make sure to **remove your own ad load methods** — **Lion Ads** automatically manages all ad loading processes for you.
{% endhint %}

{% hint style="danger" %}
You must remove all previous Ad related analytics event calls (either Adjust or LionAnalytics) to avoid over reporting. Lion Ads will automatically handle firing all required events.
{% endhint %}

#### Additional Documents

[Lion Ads Code Integration](/lionsdk-1.x-legacy-docs/ads.md#code-integration)

[CPM Floor Ads Bidding](/lionsdk-1.x-legacy-docs/ads/cpm-floor-ads-bidding.md)

[^1]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lionstudios.gitbook.io/lionsdk-1.x-legacy-docs/ads/how-to-convert-to-lion-ads.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
