Add Lexy to your site
Create a widget, copy one snippet and paste it into your page.
Lexy plays on your pages through a widget. A widget is one tag and one script, pasted where the game should appear. You make the widget in your dashboard, copy its code, and paste it into your page or your site's template.
Choose a widget
| Widget | What it does |
|---|---|
| Auto widget | A fresh quiz for every article, made from the page the first time someone views it. The language is detected from each page. |
| News Brief | Lexy's narrated news brief with its quiz, site-wide. It comes with the plan. See Put the news brief on your site. |
| Single game | One game you choose from your games. |
| Topic feed | The newest games from a topic, always up to date. |
| Profile | Your readers' Lexy accounts, with their scores on your site and the calls they switch on. See Add a reader profile to your site. |
Most publishers start with the Auto widget, since it covers every article with nothing to make by hand.
Create the widget
- In the header, click Create and choose Widget. You can also click Create Widget on the My Widgets page.

The Create Widget drawer, with the widget types listed and Auto widget at the top. - Choose a widget type.
- Fill in its settings.
- Auto widget. Choose a Fallback language for any page whose language can't be detected, and how many Questions per game a reader plays on a page. Then enter your site under Allowed Domain, such as
example.com. - Single game. Search your games and pick one. Only published games are listed.
- Topic feed. Choose the language, then the topic.
- Auto widget. Choose a Fallback language for any page whose language can't be detected, and how many Questions per game a reader plays on a page. Then enter your site under Allowed Domain, such as
- Set the color. With Auto switched on, Lexy reads your brand color from the allowed domain. Switch it off to type your own.

The Auto widget settings, with Fallback language, Questions per game, Allowed Domain and Primary Color filled in. - Click Save widget. You are taken to My Widgets.
Enter the domain on its own, without https:// or a path. Subdomains are covered, and www. is ignored.
Copy the code onto your page
- On My Widgets, click Details on the widget.
- Under JavaScript Embed Code, click Copy Code. The widget's menu, the arrow next to Preview, also has Copy Embed Code.

The widget details on My Widgets, with the JavaScript Embed Code box and the Copy Code button. - Paste the code where the widget should appear. That is your article template for an Auto widget, or a single page for a game.
The code looks like this.
<lexy-widget id="your-widget-id"></lexy-widget>
<script src="https://cdn.lexy.fm/embed.js" async></script>
The script only needs to be on the page once, even with several widgets.
Make it live
- Auto widget. It shows as Pending on My Widgets until it first loads on your allowed domain. Open any article with the code on it, and it turns active by itself.
- Single game and Topic feed. These are saved as a draft. Open the widget's menu on My Widgets and choose Publish.
Until a widget is live, the page shows a short "not available" message in its place.
Settings you can change later
Open the widget's menu on My Widgets and choose Edit. To see the widget as readers will, click Preview Widget in the same drawer.
| Setting | What it does |
|---|---|
| Widget Mode | Embedded card sits in the page. FAQ shows the questions and answers as an accordion. QR shows a scan-to-play code instead of the card. Overlay is a floating launcher over the page. The mode you choose opens to show its own settings. See Choose how a widget looks on your page. |
| Questions per game (Auto widget) | How many questions one reader plays on a page. Choose 3, 5, 7 or 9. |
| Filled Card, Show Title, Show Icon (Embedded card) | The card filled with your color, the game title, and the topic icon. |
| When it appears, Where it sits, Style, Voice enabled (Overlay) | When the launcher shows, whether it sits in the page corner or on your video, how it is drawn, and whether Lexy reads the questions aloud. See Float a quiz over the page or the video. |
| Number of Results (Topic feed) | How many games the feed shows, from one to four. |
| Allowed Domain, Primary Color | Where the widget runs and the color it wears. See Match the widget to your site. |
Common questions
Does it work with WordPress?
Yes. Paste the code into a Custom HTML block, or into your theme's article template for an Auto widget. There is no plugin to install.
Can one widget run on more than one site?
Yes. Allowed Domain takes a list separated by commas, such as example.com, example.org. Reports can still be filtered by site.
Will the widget push my page around as it loads?
Add a height to the tag, such as <lexy-widget id="your-widget-id" height="420">, and the space is kept for it while it loads.
Thanks for letting us know.
Thanks. Write to support@lexy.fm with what you were looking for, and we will answer and improve this page.