Advice and answers from the UserGuiding Team
Users
Engagement
Settings
Banners
Learn how to utilize the UserGuiding's JavaScript API to show or hide banners

Show a Banner

Displays a Banner by its ID. Use this to programmatically show a specific in-app announcement at the exact moment you choose. If another banner is currently visible, it will be replaced by the requested one.


Type Definition

type launchBanner = (bannerId: number) => void


Example

Shows the “Black Friday” banner (ID 3001)


userGuiding.launchBanner(3001);


Hide the Banner

Hides any currently visible Banner. If no banner is showing, the call is a no-op.


Type Definition

type hideBanner = () => void


Example

Dismiss the active promo banner


userGuiding.hideBanner()
Did this answer your question?