# Ad Space and Fill Rate

### Definitions <a href="#definitions" id="definitions"></a>

* An ad space represents the *intention* to display a new ad within your application. You can also call it an app-created *opportunity* to show a new ad.
* The total of created ad spaces is the “runtime inventory” of your app. It totally depends on the ad integration, the frequency capping and the number of user sessions of your app and their durations.
* Ad spaces are the denominator of the fill rate calculation in our [Dashboard](https://dashboard.addapptr.com/):

```swift
Fill rate [%] = impressions * 100 / ad spaces
```

* AATKit counts and reports ad spaces for banners, fullscreens (and rewarded videos), and native ads in different ways due to the different nature of these placements.

### Sticky and Multi-Size Banner <a href="#sticky-and-multi-size-banner" id="sticky-and-multi-size-banner"></a>

For sticky and multi-size banners, we have to distinguish between manual reloading and auto-reloading.

**Manual reloading**

Once an app calls the method

{% tabs %}
{% tab title="Java" %}

```java
placement.reload();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
placement.reload()
```

{% endtab %}
{% endtabs %}

AATKit counts an ad space. The assumption is that the app wants to display a banner when it manually calls reload.

**Auto-reloading**

{% tabs %}
{% tab title="Java" %}

```java
placement.startAutoReload();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
placement.startAutoReload()
```

{% endtab %}
{% endtabs %}

By default, AATKit counts an ad space every 30s. If you make use of [frequency capping](https://aatkit.gitbook.io/android-integration/advanced/frequency-capping), the interval of counting an ad space is the “minimum delay” that you set. By using frequency capping, you deliberately limit the number of possible ad spaces.

### Infeed Banner <a href="#infeed-banner" id="infeed-banner"></a>

Infeed banner placement reports ad spaces either automatically or manually.

**Automatically (default)**

Infeed banner placement counts an Ad Space every time the app requests an ad from it. Shall only be used, if the app is presenting banners immediately (= not caching them for later use).

**Manually**

The app needs to notify the infeed banner placement about every Ad Space it creates (= placement doesn’t count Ad Spaces itself). This is especially useful if the app implements its own banner caching (e.g. in order to create a smooth user experience for the feed). In this case, the app should notify the placement about an Ad Space only if the feed cell intended for presenting a banner reaches the visible area of the screen (regardless of whether an ad was available for it or not).

To use the manual Ad Space counting, please see the `InfeedBannerPlacement` [configuration section](https://aatkit.gitbook.io/android-integration/formats/banner/infeed-banner#configure-aatbannerconfiguration).

### Banner Cache <a href="#banner-cache" id="banner-cache"></a>

The banner cache automatically takes care of correct ad space counting (it counts an ad space whenever you try to consume an ad because we assume, you only consume an ad when you need to present it right now).

### Fullscreen (Interstitial) and Rewarded Video <a href="#fullscreen-interstitial-and-rewarded-video" id="fullscreen-interstitial-and-rewarded-video"></a>

When the app calls the show method:

{% tabs %}
{% tab title="Java" %}

```java
placement.show();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
placement.show()
```

{% endtab %}
{% endtabs %}

AATKit counts an ad space (irrespectively of the fact whether an ad could previously be loaded or not) unless frequency capping is applied: if your frequency capping just allows e.g. one impression per hour, AATKit will also count one ad space per hour at max. By using frequency capping, you deliberately limit the number of possible ad spaces.

### Native Ad <a href="#native-ad" id="native-ad"></a>

Since apps may cache native ads, they need to tell AATKit when to count an ad space. Usually, this would be appropriate at the moment, when the app intends to present a native ad on the screen.

{% tabs %}
{% tab title="Java" %}

```java
placement.countAdSpace();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
placement.countAdSpace()
```

{% endtab %}
{% endtabs %}

**Misc**:\
If a developer does not communicate an ad space, our backend automatically sets the number of ad spaces equal to the number of impressions (resulting in a 100% fill rate).


---

# Agent Instructions: 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:

```
GET https://aatkit.gitbook.io/android-integration/advanced/ad-space-and-fill-rate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
