👉Widgets
A Widget is a drop-in gamification block you build in Vibe Studio and embed anywhere on your existing website - a leaderboard in the lobby sidebar, a missions strip across the top of the sports page, a badge wall on the account screen. You design the look; the live data flows in from Smartico.




When to use a widget
Use a widget when you want gamification inside your existing product, rather than on a separate page. Widgets run for logged-in players, so they show each player's own missions, balances, level, and rewards out of the box.

What you can put in a widget
Almost any Smartico mechanic: Missions, Levels, Tournaments, Leaderboards, Store, Avatars, Badges, Activity Log, Inbox, Raffles, Jackpots, Clans, or several blended into one surface. Vibe Studio builds the presentation; for how each mechanic itself works, see its own Help Center article.
How a widget reaches the player
A widget is a small JavaScript bundle hosted by Smartico (on the widgets domain). You don't link to it; you embed it. The host page mounts it into a <div>, and the widget reads the logged-in player, the label/brand keys from the Smartico SDK that is already running on that page. That is the one prerequisite: the page you embed on must already initialize the Smartico SDK (the standard _smartico.init(...) integration your site uses for popups, missions, etc.). Because the Smartico SDK already knows the player and the label, a widget needs no per-player parameters - identity comes from the host page.
Publishing and embedding (step by step)
Create. Go to Vibe Studio → Widgets and click Create. Pick a template, enter a name and click Use this template. On the widget's page, click Open for Editing to open the Studio.
Publish. In the Studio toolbar, click Publish, then confirm in the Publish this widget? dialog. This builds the widget and pushes it live to the CDN.

Get Code opens automatically. After a successful publish, the Get Code pop-up opens with your embed snippet. (You can also open it any time from the toolbar button to the left of Publish.)

Set the layout first (optional). Open Widget Layout (the button next to Get Code) to choose:
Container width and Container height - Auto (width fills the space, height grows with the content), or Fixed in pixels.
Fit - Content (the widget sizes to its own content) or Fill (it fills the container you give it).
Background - the colour behind the widget in the preview, so you can match your site. It is not part of the embed code.

Copy the snippet. It looks like this:
The
<div>is the placeholder where the widget mounts; itsstylecarries your container size (fixed width giveswidth:Npx, otherwisewidth:100%; a fixed height addsheight:Npx;overflow:auto)._smartico.gamificationBlock({ ... })mounts the widget.dom_idmatches the placeholder,urlpoints to your published widget bundle, andfitis your Widget Layout choice.
Tip: Re-publish whenever you make changes - the embed
urlstays the same, so you don't have to touch your site again; the new version propagates from the CDN. A player's browser can keep the old version for up to an hour.
When your site removes the widget
On a single-page site (React, Vue, Angular and others), moving to another screen often removes the widget's <div> from the page without a page reload. The Smartico SDK notices this and stops the widget: its timers and its requests to Smartico end. You don't need to call anything.
By default, the widget keeps running for 30 seconds after its <div> leaves the page:
If the same
<div>comes back within that time (for example, your site keeps the screen in memory and shows it again), the widget is just as the player left it.If it comes back later, the widget loads again from the start.
A new
<div>with the same id gets the widget only from a new_smartico.gamificationBlockcall, as on the first visit.
Calling _smartico.gamificationBlock again with the same dom_id replaces the widget in that <div> at once.
To change the 30 seconds, add keep_alive_sec to the call:
keep_alive_sec
What happens after the <div> leaves the page
not set
The widget stops after 30 seconds.
0
The widget stops at once (within about a second).
a number of seconds
The widget stops after that many seconds.
Infinity
The widget never stops. Use it only if your site always shows the same <div> again.
A negative value or a value that is not a number is refused: the widget is not shown, and the browser console shows an error.
If your widget is about one specific thing
Some widget templates are built around a single entity (one specific tournament, raffle, mini-game, or matchx/quiz template).

Those declare an extra field - a picker in the toolbar where you choose which entity to show. Your choice is baked into the embed url as a query parameter, so the published widget shows the right one.

Check it before you embed
Run /verify in the chat for a general review, then /widget-check - it audits the widget for anything that could escape its box or affect the host page's styles, and can fix it (/widget-check fix all, don't ask). This matters because a widget runs inside someone else's page.

Examples to ask the assistant for
"A weekly leaderboard, top 10, with the current player's row highlighted and a countdown to reset."
"A missions strip showing the three missions closest to completion, with progress bars."
"A badge showcase grid for the player's account page."
FAQ
The widget shows nothing on my site. The host page must already run the Smartico tracker (_smartico.init). Paste the snippet after that init, and make sure the dom_id in the snippet matches the <div> id. Inside the Studio, an empty preview just means you haven't picked a Preview user in the toolbar yet.
Where is the widget hosted? On the Smartico widgets domain; the published bundle is the url in your snippet. Your page stays in control of where it sits and how big it is (via the <div> style / Widget Layout).
Will it break my site's styling? No - a widget is isolated from the host page. And AI is instructed explicitly to keep styles isolated. Still, run /widget-check before embedding to catch anything that could leak to the main page.
How do I make it match my brand? Set your label's brand rules once, and the assistant follows them on every build - see Brand rules for your label. The Label branding button on the widget's page in the Back Office opens this setting. You can also attach a screenshot or a Figma frame.
Last updated
Was this helpful?