The widget disappears when I navigate my app
This applies to single-page apps (React, Vue, and similar) — sites that load one HTML shell and then swap content as the visitor clicks around, without a full page reload.
How it's supposed to work
You load the widget once, from the app's shell HTML or root component (see React / Vue). The widget then watches for in-app route changes and re-applies itself on each one — so it stays present and a visitor's choices carry across navigations. You do not re-inject the script on every route.
If it loads first, then drops on navigation
- Confirm you load it once, in the right place. It belongs in the shell
index.html(or your root component), not inside an individual route/page component that unmounts when you navigate away. If it's mounted per-route, it gets torn down on navigation — move it to the root.
- Don't add it multiple times. Loading the script in more than one place can cause it to fight itself. The recommended React/Vue snippets guard against double-loading by checking for an existing
data-sitescript — keep that guard. Load it in exactly one place.
- Hard-reload to retest. After changing where you load it, do a full refresh (not just an in-app navigation) so the new setup initializes cleanly, then navigate around again.
If it never appears at all
That's a different problem — start with The widget isn't showing at all.
Was this page helpful?
Thanks for the feedback. Need more help? Email [email protected].
