Skip to content

Utilities

Records a page view and re-evaluates which content should show on the current page. The SDK does this automatically when the URL changes. Call it yourself only if you turned off automatic capture with disablePageViewAutoCapture.

type page = () => void
window.userGuiding.page()

With automatic capture off, call page() once when the SDK loads and again after every route change.

// Before the container script
window.userGuidingSettings = { disablePageViewAutoCapture: true }
// In your router
router.afterEach(() => {
window.userGuiding.page()
})

Opens the troubleshooter panel on the current page. It shows whether the container is embedded, who the current user is and, for each piece of content, which rules passed or failed.

type activateTroubleshooter = () => void
window.userGuiding.activateTroubleshooter()

Closes the troubleshooter.

type deactivateTroubleshooter = () => void
window.userGuiding.deactivateTroubleshooter()

Turns on verbose SDK logging in the browser console for the current tab. The setting lasts until the tab is closed.

type enableDebugLogs = () => void
window.userGuiding.enableDebugLogs()

Turns verbose logging off again.

type disableDebugLogs = () => void
window.userGuiding.disableDebugLogs()