YOUR_WIDGET_ID with the ID from your widget page.
If your dashboard snippet includes
d, kv and sig parameters, keep them in the URL in every example below. See Embed security.Template languages
<script> from your dashboard snippet unchanged.
Script tag that reads the page
If you can’t edit template variables, you can mount the widget from the page itself. This script turns every<aside data-polyembed> slot into a widget, using the slot’s data-title and data-keywords, or falling back to the page’s og:title, <meta name="keywords"> and document.title. It’s the approach used by the demo news site.
Article template
/assets/polyembed.js
<aside> on polyembed:hide also removes any heading or border you wrap around the widget.
React and Next.js
PolyEmbed.tsx
app/news/[slug]/page.tsx
Choosing good keywords
Use your CMS’s tags if they’re specific. If your tags are broad sections, leave keywords empty and let the title do the matching, or use a field your editors fill per story. See Market matching.