Availability. The script-tag and Google Tag Manager paths work today. The@puntego/reactand@puntego/embednpm packages are rolling out — ifnpm install404s, the packages have not published yet; use the script tag in the meantime. The GTM template is available from puntego.com/gtm/template.tpl and the GTM Community Template Gallery.
Next.js (App Router)
Install the React wrapper:<PuntegoProvider> only
loads the widget in a client effect, it is safe to render on the server.
CSP nonce
If you serve a strict Content Security Policy with a per-request nonce, read it fromnext/headers and pass it to the provider. It is propagated to both
nonce and data-nonce on the boot script.
script-src and the worker origin in connect-src.
See CSP for the full policy.
Declare targets
Declared targets are the highest-priority grounding tier — the guide resolves them before falling back to DOM heuristics, which measurably raises action success. Declare the elements that matter on each page; the hook registers on mount and unregisters on unmount.React
The same@puntego/react package works in any React 18+ app (Vite, CRA,
Remix). Wrap your app once in <PuntegoProvider>, then use usePuntegoTarget
and usePuntegoAction to declare targets and actions per component. Use
usePuntego() for imperative calls such as point or sendMessage.
Single-page apps and client-side routing
The runtime hookshistory.pushState and popstate, so client-side route
changes are detected automatically — there is nothing to wire up for React
Router, Vue Router, or SvelteKit navigation. The guide re-reads the page on each
route change, and an in-progress tour resumes across navigations.
If you mount and unmount declared targets across routes, prefer the framework
hooks (or call window.Puntego.registerTarget / unregisterTarget from your
own lifecycle) so the registry always matches what is on screen.
Google Tag Manager (no code)
If you cannot edit your site’s HTML but you have a GTM container, use the community template.- In GTM, open Templates → Tag Templates → New, then import the template. Download it from puntego.com/gtm/template.tpl, or find Puntego Embed in the GTM Community Template Gallery.
- Add a Puntego Embed tag and fill in your App ID and Worker API origin (copy both from Dashboard → Install).
- Trigger on All Pages (Initialization), then Preview and Publish.
boot.js once and publishes a window.__PUNTEGO_CONFIG__
object that the boot script reads when no data-app-id attribute is present.
The GTM and hand-pasted paths share the same runtime.