# Banner

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

[playgama-bridge-config](https://wiki.playgama.com/playgama/sdk/playgama-bridge-config "mention")
{% 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
bridge.advertisement.isBannerSupported
```

{% 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
let position = 'bottom' // optional, 'top' | 'bottom', default = bottom
let placement = 'test_placement' // optional
bridge.advertisement.showBanner(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
bridge.advertisement.hideBanner()
```

#### 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
bridge.advertisement.bannerState
```

```javascript
// Listen for banner state changes
bridge.advertisement.on(bridge.EVENT_NAME.BANNER_STATE_CHANGED, state => {
    console.log('Banner state: ', state)
})
```

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/core-plain-js/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.
