@puntego/embed, or @puntego/react. Keep the package and CDN boot script on
the same supported generation. Do not load two scripts or two Providers to
bridge an upgrade.
Compatibility signal
The public runtime exposeswindow.Puntego.protocolVersion. The current loader
expects protocol 1 and checks it once per page. A missing or different value
produces a console warning with this guide; it does not send telemetry, block
the visitor, or reveal application data.
Script tag to programmatic loader
- Remove the hand-authored
<script>from the host template. - Install
@puntego/embedafter the package is publicly available. - Call
loadPuntegoonce from the application’s client lifecycle. - Preserve the same app ID, worker URL, CSP nonce, theme, and optional server-minted customer identity token.
- Run
puntego doctor --strictand an external clean-project build.
Loader to React
Replace the direct loader lifecycle with onePuntegoProvider near the client
application root. Do not keep the old loadPuntego call.
usePuntegoTarget or
usePuntegoTargetRef. Keep identity minting on the server; never migrate a
programmatic API key into a React prop or browser environment variable.
Built-in UI to headless
Headless mode is immutable for the lifetime of the page. Setheadless: true
on the first loader or Provider call, render sanitized snapshots from
@puntego/embed/headless, and remove code that opens the built-in panel.
Consent, action confirmation, postconditions, match proofs, and audit receipts
remain enforced by the runtime and Worker.
Upgrade checklist
- Use one exact version for
@puntego/embedand@puntego/react. - Rebuild from a clean external project and inspect the packed tarballs.
- Run
puntego doctor --strict. - Run the official Playwright helpers against local or staging.
- Verify boot, authenticated identity, targets, one Experience engagement, and one governed action receipt.
- Confirm CSP and Trusted Types before production rollout.
- Roll back package and boot-script changes together if protocol diagnostics appear.
1. Future
deprecations will retain the old behavior for their documented window and emit
a bounded once-per-page warning with the replacement and removal version.