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 = () => voidwindow.userGuiding.page()Track a page change
Section titled “Track a page change”With automatic capture off, call page() once when the SDK loads and again after every route change.
// Before the container scriptwindow.userGuidingSettings = { disablePageViewAutoCapture: true }
// In your routerrouter.afterEach(() => { window.userGuiding.page()})activateTroubleshooter
Section titled “activateTroubleshooter”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 = () => voidwindow.userGuiding.activateTroubleshooter()deactivateTroubleshooter
Section titled “deactivateTroubleshooter”Closes the troubleshooter.
type deactivateTroubleshooter = () => voidwindow.userGuiding.deactivateTroubleshooter()enableDebugLogs
Section titled “enableDebugLogs”Turns on verbose SDK logging in the browser console for the current tab. The setting lasts until the tab is closed.
type enableDebugLogs = () => voidwindow.userGuiding.enableDebugLogs()disableDebugLogs
Section titled “disableDebugLogs”Turns verbose logging off again.
type disableDebugLogs = () => voidwindow.userGuiding.disableDebugLogs()