For the complete documentation index, see llms.txt. This page is also available as Markdown.

Advanced Banners

You are reading the documentation for Bridge SDK v2. If you need the obsolete v1 documentation, see Documentation (v1).

Advanced Banners let you define responsive banner layouts that adapt to device type, orientation, and screen size. Unlike regular banners, which support one top/bottom placement, Advanced Banners can render multiple banners at custom positions and switch layouts automatically when conditions change.

When to use Advanced Banners over regular Banner

  • You need banner placement other than top/bottom (corners, sides, multiple banners at once).

  • Layouts must differ between mobile and desktop, or portrait and landscape.

  • You want banner visibility to react to game lifecycle messages (e.g. show on level_paused, hide on level_resumed) without writing show/hide calls everywhere.

Configuration

Advanced Banner settings live in the config under the advertisement.advancedBanners key.

{
    "advertisement": {
        "advancedBanners": {
            "disable": false, // disable Advanced Banners entirely
            "placementFallback": "main_menu", // placement used when showAdvancedBanners() is called without one
            "main_menu": { // every other key defines a placement
                "action": "show", // 'show' (default) or 'hide' — what to do when the placement is triggered
                "default": [ // layout used when no condition key matches
                    { "width": "20%", "height": "25%", "top": "10%", "right": "10%" }
                ],
                "mobile:portrait": [ // condition key — layout for a specific environment
                    { "width": "100%", "height": "10%", "bottom": "0%", "left": "0%" }
                ],
                "desktop:landscape:w>1200": [ // several banner objects = several banners shown at once
                    { "width": "10%", "height": "60%", "top": "10%", "left": "2%" },
                    { "width": "10%", "height": "60%", "top": "10%", "right": "2%" }
                ]
            },
            "level_resumed": {
                "action": "hide"
            }
        }
    }
}

Every key except disable and placementFallback defines a placement. The placement name matches a built-in or custom platform message (level_paused, gameplay_started, shop_opened, …) or the string you pass to showAdvancedBanners(). Each banner object inside a layout positions the banner with width, height, top, bottom, left, right.

Condition keys

A condition key is a colon-separated list of segments; its layout is used only when all segments match the current environment:

  • Device type — mobile, desktop, tablet, tv

  • Orientation — portrait, landscape

  • Width / height — w>600, w<=1024, h>400, … (window size)

  • Aspect ratio — ar>1.5, ar>=1.78, … (width ÷ height)

  • canvas — evaluate the size and aspect-ratio segments against the game canvas instead of the window

Combine segments with :, e.g. desktop:landscape:w>1200. When several variants match, the most specific one wins: device type weighs the most, then orientation, then each size / aspect-ratio segment; ties go to the key with more segments, then to the threshold closest to the actual value. If no variant matches, default is used.

Is Advanced Banners Supported

Check this before showing banner-related UI.

Platform support · 3 of 26 platforms

Supports: crazy_games, msn, playgama

Does not support: discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, ok, playdeck, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Show Advanced Banners

Show banners for a placement configured in the config file. If placementFallback is set, the placement argument can be omitted.

If placementFallback is set in the config, you can call without arguments:

Hide Advanced Banners

Show / Hide via Platform Messages

Advanced Banners can react to platform messages. When you send a built-in or custom message, Bridge checks whether the config has a matching placement and runs that placement action.

This is the recommended approach because banner visibility follows your game lifecycle without extra show/hide calls.

Advanced Banners State

Possible values: loading, shown, hidden, failed.

Automatic Behavior

  • Fullscreen ad coordination — Advanced Banners are hidden automatically when an interstitial or rewarded ad starts (loading or opened) and restored when it finishes (closed or failed). No extra code is needed.

  • Responsive re-evaluation — when the screen orientation changes or the window is resized, Bridge re-evaluates condition keys and switches to the best-matching layout variant (with a 200 ms debounce).

Last updated