# Banner

{% hint style="info" %}
There are some advertisement settings in the `playgama-bridge-config.json` file

[Playgama Bridge Config](/playgama/sdk/playgama-bridge-config.md)
{% endhint %}

#### Is Banner Supported <a href="#is-banner-supported" id="is-banner-supported"></a>

Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game

```javascript
playgama_bridge_advertisement_is_banner_supported()
```

{% hint style="info" %}
Ensure that in-game banners are not displayed during gameplay on CrazyGames. Please refer to [Advertisement - CrazyGames Documentation](https://docs.crazygames.com/requirements/ads/).&#x20;
{% endhint %}

#### Show Banner <a href="#show-banner" id="show-banner"></a>

Display a banner ad within your game to generate revenue through advertising.

```javascript
var position = "bottom" // optional, "top" | "bottom", default = "bottom"
var placement = "test_placement" // optional
playgama_bridge_advertisement_show_banner(position, placement)
```

#### Hide Banner <a href="#hide-banner" id="hide-banner"></a>

Hide the currently displayed banner ad when it is no longer needed.

```javascript
playgama_bridge_advertisement_hide_banner()
```

#### Banner State <a href="#banner-state" id="banner-state"></a>

Monitor the state of the banner ad (loading, shown, hidden, failed) to manage its display and troubleshoot issues.

```javascript
playgama_bridge_advertisement_banner_state()
```

```javascript
// Listen for banner state changes

// via Async Social Event
if async_load[? "type"] == "playgama_bridge_advertisement_banner_state_changed" {
    switch async_load[? "data"] {
        case "loading":
            // your logic here
            break
        case "shown":
            // your logic here
            break
        case "hidden":
            // your logic here
            break
        case "failed":
            // your logic here
            break
    }
}
```

Possible values: `loading`, `shown`, `hidden`, `failed`.


---

# 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://wiki.playgama.com/playgama/sdk/engines/gamemaker/advertising/banner.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.
