> 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/readme/features/ads/bidsmart.md).

# BidSmart

BidSmart is our optional system designed to improve monetization performance and help drive higher ad revenue in your title. If you’re interested in enabling it, please coordinate with your Lion Studios Manager so we can make sure your setup is ready and guide you through rollout/testing.

BidSmart runs on top of Lion Ads and does not interfere with standard ad loading. When an eligible higher-paying ad is available, BidSmart will serve that instead.

<figure><img src="/files/IbeTWTJEMYrG1oBGcywu" alt=""><figcaption></figcaption></figure>

To enable BidSmart:

1. Enable BidSmart from the Ads settings page.
2. Fill out the required settings for each platform (iOS / Android).
3. Provide BidSmart config to Lion Ads via Remote Config or a local fallback.

{% hint style="warning" %}
If the **BidSmart** checkbox in the **LionSettings** window remains unchecked in the build, the remote config settings will not do anything. Make sure the checkbox in the Settings window is checked.
{% endhint %}

#### Remote Config

{% hint style="info" %}
The default config and ad units will be provided to you by your Lion Studios Manager.
{% endhint %}

We keep BidSmart settings simple and handle the rest for you. BidSmart only enables after it receives a remote config, and it caches the last received config to speed up loading in the next session.

Sample remote config JSON value for **LionAdsRemoteConfig**:

* BidSmart (Enabled): A boolean flag that controls whether the BidSmart system is active in your title. Default value: **False**
* UpCoefBase: The base coefficient controlling how aggressively BidSmart raises the bid floor after a successful ad load. Higher values push the floor up faster to chase higher-paying ads; lower values increase more gradually. The default is tuned to balance revenue maximization against fill-rate stability. Default value: **2.0**
* DownCoefBase: The base coefficient controlling how aggressively BidSmart lowers the bid floor after no-fill errors. Higher values recover fill rate faster after failures; lower values keep the floor closer to its previous value. The decrease is capped and will never drop below the safety floor sourced from the standard ad unit. Default value: **0.35**
* FillRateMinimum: The minimum acceptable fill rate threshold (0–1) for BidSmart ad units. When the observed fill rate falls below this value during a failed load, the under-minimum fail streak counter is incremented, feeding into the auto-disable safety mechanism. Default value: **0.3**
* FailStreakUnderMinimumMax: The maximum number of consecutive failed loads under `FillRateMinimum` before BidSmart auto-disables itself for the affected ad type. Once triggered, BidSmart stops loading and falls back to the standard ad unit to prevent prolonged revenue loss from unfillable floors. Default value: 10

{% hint style="warning" %}
If no remote config is passed, the **BidSmart** system will remain disabled in the package and **Standard** LionAds functionality will keep working as it is. To enable **BidSmart** system, make sure the remote config value is passed correctly.
{% endhint %}

```
{
  "BidSmart": {
    "Enabled": true,
    "UpCoefBase": 2.0,
    "DownCoefBase": 0.35,
    "FillRateMinimum": 0.3,
    "FailStreakUnderMinimumMax": 10
  }
}
```

Once your remote configuration has been received, pass it to Lion Ads as early as possible by calling:

```csharp
LionAdsRemoteConfigHandler.SetRemoteConfig(LionAdsRemoteConfig config)
```

<details>

<summary>Lion Remote Configs Package Implementation Sample</summary>

```csharp
private const string LION_ADS_AB_TEST_NAME = ""; //Put your RC key here to get value

void Awake(){    
	if (!RemoteConfigsController.IsInitialized)    
	{        
		RemoteConfigsController.OnInitialized += delegate        
		{
			ApplyRC();
		};
	}
	else
	{
		ApplyRC();
	}
}

void ApplyRC()
{
	LionAdsRemoteConfig config = null;
	var json = RemoteConfigsController.GetValue<string>(LION_ADS_AB_TEST_NAME,null);
	
	if (string.IsNullOrEmpty(json))
	{
		Debug.LogError(LION_ADS_AB_TEST_NAME + " json returned null or empty!");
		return;
	}

	try
	{
		config = JsonConvert.DeserializeObject<LionAdsRemoteConfig>(json);
	}
	catch (JsonException e)
	{
		Debug.LogError($"Failed to parse {LION_ADS_AB_TEST_NAME} JSON. Error: {e.Message}");
		return;
	}
		
	LionAdsRemoteConfigHandler.SetRemoteConfig(config);
}
```

</details>

That’s it, BidSmart is now enabled and ready to use!

### Extras

A few things worth knowing about LionAds:

* When BidSmart is enabled, `LionAnalytics` automatically tags events with a `bid_smart = true` global property, so you can segment cohorts in analytics without extra code.
* `LionAdsRemoteConfigHandler.OnRemoteConfigUpdated` fires whenever a new config is applied, if you need to react in your own modules.


---

# 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/readme/features/ads/bidsmart.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.
