Embeddable widget
Last updated: June 26, 2026
A rules assistant on your site in 5 minutes
The widget is a standalone rules chat interface that you embed on your own website. Your players get instant answers to rules questions without leaving your page.
Loading diagram...
The widget communicates with the orchestrator through a dedicated /api/widget/* endpoint that handles session management and partner attribution.
Two integration methods
Method 1: JavaScript widget (recommended)
<script src="https://www.boardgamelibrarian.ai/widget.js"></script>
<script>
BGLWidget.init({
apiKey: 'YOUR_API_KEY',
gameId: 12345,
container: '#bgl-widget',
});
</script>
<div id="bgl-widget"></div>
This is the simplest integration. One script tag, one init call, one container element. You get programmatic control over the widget lifecycle and can set options dynamically.
Method 2: iframe
<iframe
src="https://www.boardgamelibrarian.ai/embed?apiKey=YOUR_KEY&gameId=12345"
width="100%" height="600"
frameborder="0">
</iframe>
Fully isolated — no JavaScript dependency on your page. Works in any CMS (WordPress, Webflow, Shopify, Wix).
Transparent mode
If you want the widget to match your site color scheme, set transparent: true in the init options. The widget background becomes transparent and inherits your page CSS.
Session handling
The widget reuses sessions by partner + IP combination. A player who closes and reopens the widget within the same session window gets their conversation history back.
Analytics
Every question asked through your widget is tracked in the partner portal — game coverage, response confidence, player satisfaction. See the Partner Portal article for details.