window.Puntego when your app already knows the right target or workflow and wants the guide to show it without waiting for a model turn. This is the imperative side of the guide: you call a method, the guide points, highlights, scrolls, or walks a tour right away.
Importing @puntego/embed augments the global Window, so window.Puntego is fully typed in TypeScript. The methods below are part of that typed surface unless a section says otherwise.
Call these methods after the runtime is ready. Wait for the
ready event (or whenPuntegoReady from @puntego/embed/loader) before driving the guide, since window.Puntego is only present once the boot script has mounted.Point, highlight, and scroll
These three single-shot methods cover most “show the visitor this element” cases. They run synchronously and returnvoid, so there is nothing to await.
Show multiple markers
Usemarkers to label several elements at once — for example, to annotate a pricing grid or a multi-step form.
Run a guided tour
Usetour to chain steps into a single narrated sequence. Each step names a target and a step type (point, scroll, spotlight, or caption).
Use the control namespace
The same controls are mirrored underwindow.Puntego.control for product-owned helpers that want a stable namespace. The visual methods (point, caption, highlight, scrollTo, markers, tour) return void. Only speak is asynchronous, so it is the one to await.
Register stable targets
Register stable IDs instead of relying on brittle selectors. Registered targets survive markup changes and let you constrain exactly which actions the guide may run against an element.unregisterTarget('pricing-card-growth') when the element leaves the page so the guide stops resolving it.
Report workflow outcomes
When your app owns the state transition — a plan upgrade, a form submission, a booking — report the outcome so owners can see what happened.reportWorkflowResult is asynchronous, so await it.
Advanced runtime helpers
The runtime also exposesgetPageContext() and locateTarget() for apps that need to inspect what the guide can currently see before driving it. These are runtime-only helpers: they are not part of the typed window.Puntego surface, so a TypeScript consumer needs a cast to call them.
Because these helpers are not typed, their return shapes may evolve. Treat them as advanced inspection tools rather than a stable contract, and prefer the typed methods above for production flows.
Next steps
SDK reference
The full typed surface for
window.Puntego — every method, event, and option in one place.Verified Actions
Let the guide read or change a business object after policy checks, with confirmation and audit logging.