Docs

Single-page apps

The snippet follows route changes on its own. Call Cueston.page() only for routers it can't see.

The snippet watches for route changes in single-page apps: history.pushState, history.replaceState, the back and forward buttons (popstate) and hash changes. After a change it checks targeting again: items for the new URL appear, and items whose pattern no longer matches go away.

That covers React Router, Next.js, Vue Router, Angular and most others with no extra code.

Custom routers

If your app changes what's on screen without changing the URL that way, tell Cueston after each change:

JavaScript
Cueston.page();

Elements that render late

Tours and tooltips wait a moment for their element to appear, so an element rendered after data loads still gets its tooltip. If it never shows up, the SDK records target_missing. Broken steps show in Analytics, and AI agents can list them with the list_issues tool.

Signing in and out

Call Cueston.identify() when the signed-in user changes and Cueston.reset() on sign-out, wherever your app learns about it (an auth provider, a store subscription). See Identify users.

On this page