Developers
Developer Install
Platform-agnostic embed reference for engineering teams — parameters, CSP, multiple games, and verification.
Newsroom Puzzles is a single async script — no npm package, no API keys, no server-side SDK.
If your team can add one <script> tag to a template, you can ship puzzles in minutes.
The embed contract
Paste this anywhere in your page HTML. The widget mounts immediately after the script and isolates its CSS in Shadow DOM.
<script src="https://newsroompuzzles.com/embed.js?site=yourpaper.com&game=sudoku"></script>
Replace yourpaper.com with the domain readers see in the browser bar.
Analytics are keyed on site= — keep it consistent across every embed on that property.
Available games
Change game= to switch puzzles. All games ship in the same script file (~40 KB).
game value |
Puzzle | Notes |
|---|---|---|
sudoku | Sudoku | Default |
akari | Akari (Light Up) | Logic grid |
wordsearch | Word Search | Supports pack= |
hangman | Hangman | Supports pack= |
memory | Memory | — |
game2048 | 2048 | game=2048 also works |
Word games accept themed word lists:
pack=general, sports, seasonal, newsroom, crypto, japan, yokai.
Browse live demos.
Full parameter reference
| Parameter | Required | Description |
|---|---|---|
site |
Yes | Publisher domain for analytics (e.g. yourpaper.com) |
game |
No | Puzzle type — see table above (sudoku default) |
pack |
No | Word list theme for wordsearch / hangman |
theme |
No | light (default) or dark |
accent |
No | Hex color — URL-encode # as %23 |
flat |
No | flat=1 removes outer card chrome when nested in your layout |
Example: sports word search on a games page
<script src="https://newsroompuzzles.com/embed.js?site=yourpaper.com&game=wordsearch&pack=sports&flat=1&accent=%2317181C"></script>
Content Security Policy
If your site sends a CSP header, allow the script origin and event POST endpoint:
script-src 'self' https://newsroompuzzles.com;
connect-src 'self' https://newsroompuzzles.com;
No inline scripts are required. The widget does not load additional third-party trackers.
Analytics events
On load the embed fires lightweight POST requests to /api/events on our origin:
install— widget renderedplay— reader started a puzzlewin/lose— puzzle completed or failedcta_click— “Powered by Newsroom Puzzles” link clicked
After the first event, a private stats URL is created for the domain. See a sample stats dashboard or enter your domain on the homepage.
Multiple embeds
Each script tag is independent. A games hub can run Sudoku and Word Search on the same page with two tags — use different game= values and the same site=.
Verification checklist
- View source — confirm the
<script src="https://newsroompuzzles.com/embed.js?...>tag is unmodified. - Load the page — puzzle grid appears; styles do not leak into your page chrome.
- Play one round — check your private stats link for a
playincrement. - Test mobile — widgets are responsive; minimum comfortable width is ~300px.
CMS-specific guides
Step-by-step instructions for common newsroom platforms:
- WordPress
- TownNews / BLOX CMS
- Newspack
- Squarespace & Wix
- WordPress VIP
- Ghost
- 404 page install (Laravel, Blade, static HTML)
Enterprise CMS (Arc XP, Drupal, Newscycle)
Large chains typically inject third-party scripts through a tag manager, a shared layout partial, or a CMS-specific “custom asset” module. The integration surface is the same script tag above — hand this page to your platform team and point them at the CSP and verification sections.