Real-Time Embed Test
Follow the same copy/paste flow customers use: generate the snippet in admin, paste it here, then run the embed exactly as a CMS page would. The Manual Harness Controls and plan banner above stay active on this route so consent and plan status remain visible while you test.
Environment checklist
- Run
pnpm publish:embedwhenever you rebuild@events-hub/embed-sdkso the admin snippet generator points at fresh manifests. - Start the full stack with
pnpm dev:stack(demo host 3000, admin 3001, API 4000, CDN 5173) before validating snippets end-to-end. - Use the Manual Harness Controls to flip consent states as needed. The embed should buffer telemetry while consent is pending, just like in production.
Need a refresher on the generator requirements? Review docs/product/admin-snippet.md for SRI, Trusted Types, and refusal logic.
Snippet workflow
- Open the admin snippet generator and configure tenant/embed/base path settings.
- Copy the rendered
<div data-hub-embed>snippet (container + styles + module/nomodule scripts). - Paste the snippet into the tester below, review validation output, then run it inside the preview sandbox.
Resolved origins
- Admin origin
- http://localhost:3001
- CDN origin
- http://localhost:5173
These values come from NEXT_PUBLIC_ADMIN_ORIGIN / ADMIN_EMBED_CDN_ORIGIN. Update your env files if they differ from the stack you expect to validate.