Games I Know logoGames I Know
GamesIKnow browser games shown as an Astro game widget

Astro game widget

Astro game widget for static and hybrid sites

Astro sites can ship fast, indexable pages and still offer a playable game. Keep headings, copy, and schema in the Astro page, render the GamesIKnow iframe in the body, and use a small client script or island only where browser events are needed.

Static-friendly pages

Minimal client JS

Indexable copy

Iframe frame route

Short answer

Use a frame route, then add page context.

In Astro, build an indexable page with metadata and FAQ content, then embed /embed/{gameSlug}/frame/ in the page. Add a client script for postMessage when you need GAME_STARTED or completion events.

Try the Astro-friendly game widget

The live demo mirrors the iframe and event log pattern you can place on an Astro content page.

Astro developers adding an iframe game

Why Astro works well with iframe game widgets

Astro excels at content-heavy pages. The game stays in an iframe so you do not ship game logic in the main bundle.

SEO content stays server-rendered

Headings, guides, FAQs, and schema can render as HTML while the game loads in a frame.

Small client footprint

Only event listeners or fullscreen helpers need client-side JavaScript.

Same embed everywhere

Use the same frame URL pattern across Astro, Next.js, WordPress, and custom sites.

Setup flow

How to add a game widget in Astro

Create a route with frontmatter metadata, place the iframe in the template, and isolate browser messaging in a client script.

  1. Step 1

    Create the Astro page

    Add title, description, canonical URL, and useful copy around the game placement.

  2. Step 2

    Render the iframe

    Use the GamesIKnow frame URL with your tenantId in the page body or a small partial component.

  3. Step 3

    Add client messaging if needed

    Use a client:load script or island to listen for postMessage events from the iframe.

  4. Step 4

    Verify signed results server-side

    Use an API route or backend endpoint to verify completion before granting rewards.

Implementation

Astro implementation notes

Treat the Astro page as the SEO surface and the iframe as the playable application boundary.

Do not iframe the landing page

Use /embed/{gameSlug}/frame/ inside the iframe. Keep /embed/{gameSlug}/ as a normal crawlable link.

Reserve iframe height

Set a fixed height near 640px to reduce layout shift when the game frame loads.

Add FAQ schema

FAQ and HowTo schema on the Astro page helps search engines and AI systems understand the integration.

FAQ

Common questions about Astro game widget

What is the difference between /embed/{gameSlug}/ and /embed/{gameSlug}/frame/?

Use /embed/{gameSlug}/frame/ as the iframe src. That route is the lightweight game frame built for website embeds and postMessage events. The /embed/{gameSlug}/ route is the public preview and SEO page for people, not the route to place inside an iframe.

Do visitors need to download an app or create an account?

No. Visitors can play inside the browser iframe on phone, tablet, laptop, or desktop. A partner account is only needed by the website owner who installs the embed.

Can I restrict the embed to my own domain?

Yes. GamesIKnow embeds are designed around registered websites and domain-restricted tenant settings, so copied iframe code cannot be freely reused on unauthorized sites.

Which GamesIKnow titles are currently embeddable?

Tic Tac Toe, Four in a Row, Bingo, and I Know are available as embeddable browser games. The embed documentation uses the same event model across supported games.

Can I use GamesIKnow with Astro static output?

Yes. The page content can be fully static HTML. The iframe loads the game from GamesIKnow at runtime in the visitor browser.

Ready to add a browser game?

Create a partner account, register your domain, and generate a domain-restricted iframe for your website.