> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polyembed.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Test your embed

> Preview matches for a headline, check the collapse behavior and confirm impressions before you roll out.

## Preview a headline in the dashboard

Open your widget in **Widgets** and use **Headline preview**. Type a headline to see the market PolyEmbed would match, rendered the way readers see it. If no live market is a close match, the preview tells you the widget would collapse to zero height on your page.

## Try the public demo widget

The demo widget renders anywhere, with no domain verification, so you can try titles and keywords before you have a widget:

```text theme={null}
https://iframe.polyembed.io/embed/demo-widget?title=Fed%20rate%20decision&keywords=federal%20reserve
```

Add `debug=true` to see why a title does or doesn't match. When nothing clears the threshold, the debug panel lists every candidate market with its score breakdown instead of collapsing:

```text theme={null}
https://iframe.polyembed.io/embed/demo-widget?title=Slow-roasted%20tomato%20soup&debug=true
```

> [!NOTE]
>
> The demo widget doesn't record analytics, and trading on it may be turned off. Use your own widget on your verified domain to test the real flow.

## Check your live page

**1. Open a published article**

Load an article on your verified domain (or a subdomain of it). Opening the iframe URL directly in a browser tab won't work for your own widget: the widget authorizes requests by the embedding page's origin.

**2. Check the frame**

For a story with a relevant market, you should see the market question, Yes and No odds, and trade controls. For a story with no relevant market, such as a recipe, the frame should disappear completely.

**3. Check Analytics**

Open **Analytics** in the dashboard. Impressions appear as soon as a widget renders on a live page. A rising **Widget errors** count means something in your embed needs attention.

## Checklist

* [ ] The iframe `src` has your real widget ID, not `YOUR_WIDGET_ID`.
* [ ] `title` contains the article headline, URL-encoded, with no leftover `{ARTICLE_TITLE}` or `%7BARTICLE_TITLE%7D`.
* [ ] The listener script follows the iframe, and its `getElementById` value matches the iframe's `id`.
* [ ] The page is on your verified domain or one of its subdomains.
* [ ] Your CSP, if any, allows `frame-src https://iframe.polyembed.io`.
* [ ] Articles with no relevant market leave no empty space.

If something's wrong, see [Troubleshooting](https://docs.polyembed.io/reference/troubleshooting.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.