Single Page Apps
In Single Page Applications (SPAs), navigating between pages doesn't trigger a full page reload. This means the Userback widget won't automatically detect URL changes and you need to manually call Userback.refresh() whenever the route changes in your app.
How to integrate
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';
function App() {
const location = useLocation();
useEffect(() => {
Userback.refresh();
}, [location.pathname]);
return <YourRoutes />;
}You can also call Userback.refresh() when dynamic content loads without a route change — for example, when switching tabs or loading a modal with different content.
Need help? Visit the Help Center or use the chat bubble on this page to contact our support team.