Your CMS
Stores the iframe and optional helper script.
Technical overview
A practical guide for editorial, product, platform, analytics and security teams reviewing how Nidget reaches a story page—and what remains under the publisher’s control.
01 · System at a glance
The publication owns the article. Nidget supplies an isolated interactive and the services behind it.
Stores the iframe and optional helper script.
Serves the published React widget at a stable URL.
Holds workspaces, drafts, versions and analytics.
Stores uploaded media and publication fonts.
The application and published widget routes run on the Cloudflare Workers runtime.
Structured workspace records, widget configurations, published versions, audit history and analytics are stored in D1.
Original uploads are stored in a private R2 bucket. A published asset is served only when the live widget configuration references it.
02 · Delivery
Editors can change what is live without asking the newsroom to replace embed code on every story.
Editing happens against a workspace-scoped draft. Concurrent revision checks prevent one editing session from silently overwriting another.
Nidget validates the widget configuration, creates an immutable published version and records a publication event.
The public /w/:id route resolves the widget’s current publication and applies the workspace brand system.
Published media and fonts receive long-lived immutable caching. Unreferenced private workspace assets are not exposed by the public widget asset route.
Making an earlier published version live updates the publication pointer while preserving the widget URL and audit history.
03 · Iframes and URL parameters
The iframe is the security and layout boundary. The small helper script adds automatic height and host-page context.
?theme=autoUses the host page’s dark-mode signal when the helper is present, or the reader’s system preference when opened directly.
?theme=lightKeeps the widget in its light theme even when the host or operating system is dark.
?theme=darkForces the published widget into its dark theme.
?dark=trueLegacy dark-mode flag supported for existing integrations.
?isMobileAppMarks a mobile-app webview context. It can be placed on the widget URL or forwarded from the host page by the helper.
The Nidget iframe list, viewport width, iframe container width, the host page URL, host dark-mode state and the presence of isMobileApp. The page URL is reduced to origin and pathname before analytics storage.
The iframe still renders and remains isolated. Automatic height, host-theme forwarding and exact article-path reporting are reduced, so the CMS should provide a suitable fixed or responsive height.
04 · Analytics
Published widgets do not send audience analytics or set the analytics cookie unless a workspace editor enables consent-managed collection or the testing-only mode.
Consent-managed embeds wait for an affirmative signal from the publisher’s consent system. A missing or refused signal means no collection.
After consent, a load is counted only when a published widget runs inside an iframe. Direct previews and standalone visits are excluded.
A random Partitioned, Secure, HttpOnly cookie is hashed with the publisher domain. The raw identifier is not written into analytics records.
The publisher hostname and pathname support placement reporting. Query strings and URL fragments are not stored as the article location.
Formats emit defined actions such as quiz starts and completions, answers, navigation, media playback and other widget-specific interactions.
Workspace and widget views report impressions, unique browsers, engagement rate, locations and format-specific measures across 7, 30 or 90 days.
Analytics requests are asynchronous. A collection failure does not interrupt the published widget experience.
Workspace-controlled CMP integration
A workspace editor chooses the analytics policy once in Settings. Consent-managed mode exposes the copy-ready publisher script. Testing mode needs no script and is intended only for controlled development or staging traffic—not a live audience.
05 · Product and security review
The useful review is not “do we like widgets?” It is whether the integration has a narrow surface, clear controls and an acceptable exit path.
Confirm the Nidget origin, CSP frame-src and optional script-src rules, staging behaviour, accessibility review, consent timing, data retention, incident contact, ownership and removal process.
SLA, support response, data residency, retention commitments, subprocessors, security-testing evidence, DPA terms and self-hosting scope depend on the agreed deployment—not the embed code alone.
Reviewing Nidget?
We would rather document a constraint clearly than hide it behind a feature list.
Start a technical reviewThe publisher always retains the bluntest control.
Remove the iframe, omit the helper script, block the origin in CSP, or take the widget offline from the Nidget workspace.