Skip to main content
Use 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.
window.Puntego.point('#pricing-growth', 'Growth plan');
window.Puntego.highlight('#pricing-growth', 'Growth plan');
window.Puntego.scrollTo('#checkout-summary', 'Checkout summary');

window.Puntego.markers([
  { target: '#plan-free', label: 'Free' },
  { target: '#plan-growth', label: 'Growth' },
]);

window.Puntego.tour({
  title: 'Set up billing',
  steps: [
    {
      narration: 'Start by choosing the right plan.',
      target: '#pricing-growth',
      type: 'point',
    },
    {
      narration: 'Then review the checkout summary.',
      target: '#checkout-summary',
      type: 'scroll',
    },
  ],
});
The same controls are available under window.Puntego.control for product-owned helpers that want a stable namespace:
await window.Puntego.control.point('#pricing-growth', 'Growth plan');
await window.Puntego.control.caption('Compare the plans before upgrading.');

const page = window.Puntego.control.getPageContext();
console.log(page.captureContext.targets[0]?.center_viewport);
For owner-reviewed targets, register stable IDs instead of relying on brittle selectors:
window.Puntego.registerTarget('#pricing-growth', {
  id: 'pricing-card-growth',
  allowedActions: ['point', 'spotlight', 'scroll'],
  description: 'Growth plan pricing card',
  route: '/pricing',
});
Use locateTarget when your app needs to verify what Puntego can safely see before asking it to guide a visitor:
const target = window.Puntego.control.locateTarget('#pricing-growth');

if (target) {
  console.log(target.gp_id, target.computed_name, target.bbox_viewport);
}
Report workflow outcomes when your app owns the state transition:
await window.Puntego.reportWorkflowResult({
  workflowId: 'billing-upgrade',
  actionId: 'select-growth-plan',
  status: 'completed',
  durationMs: 4200,
});
Puntego stores SDK action proposals and results through the same learning loop as model-created actions, so failed targets can become owner-approved manifest repair drafts.