Adding an Onboarding Checklist to a WordPress Site
The checklist widget was built for a JS single-page app. A WordPress page reloads on every click - here is what that changes about the embed.
WordPress is not the SPA the widget assumes
The checklist widget was designed for a single-page app: it mounts once, holds state in memory, and calls your API as the user moves around without the page ever reloading. A default WordPress site is the opposite of that. Every link click or form submit is a full page load from PHP, and the browser throws away any JavaScript state the previous page built. If you drop the embed script onto a theme template and expect it to remember “step 2 was just completed” across a page navigation the way it would in React, it won't — the widget re-initializes from scratch on every load and has to re-fetch from your API to know where the user actually is.
What that means in practice: re-fetch, don't cache in the DOM
The fix is not a WordPress-specific trick, it's the same discipline the API already expects from any client: treat the server as the source of truth for progress, and never assume the client remembers anything between loads. On WordPress, that means the embed script has to run its fetch call on every single page where the checklist appears — header, footer, or a dedicated dashboard page, it doesn't matter which — rather than trying to carry state via a cookie or local storage that a plugin update or a cache layer might clear anyway. The one thing that does need to persist across page loads is the account identifier the widget passes to the API, and that's a WordPress problem with a WordPress-native answer: pull it from the logged-in user's meta, not from client-side storage.
Embedding the script in a theme without a build step
Most WordPress sites don't have a JS bundler in the loop, so the embed has to work as a plain script tag enqueued the WordPress way, not an import in a bundle that doesn't exist. A functions.php snippet that only loads on the pages where the checklist should appear keeps it out of every other page's load:
function gs_enqueue_onboarding_checklist() {
if ( ! is_page( 'dashboard' ) ) {
return;
}
wp_enqueue_script(
'gs-onboarding',
'https://your-instance.example.com/embed.js',
array(),
null,
true
);
wp_localize_script( 'gs-onboarding', 'gsConfig', array(
'accountId' => get_current_user_id(),
) );
}
add_action( 'wp_enqueue_scripts', 'gs_enqueue_onboarding_checklist' );The wp_localize_script call is doing the identity handoff: it writes the account ID into a global the embed script reads on init, so the widget knows whose steps to fetch without you writing any custom endpoint on the WordPress side. See the API docs for the full shape of that init call.
Caching plugins will serve a stale checklist to logged-out visitors
Page caching plugins (and most hosts' edge caches) are built to serve one cached HTML response to many visitors — which is exactly wrong for a block that's supposed to differ per logged-in account. If the checklist markup gets baked into a cached page, every visitor sees whichever user's progress was cached first. The embed script itself sidesteps this because it fetches from your API client-side after the page loads, so the cached HTML only needs an empty mount point, not the actual step data. The thing to check after turning on any caching plugin is whether it's caching the page shell (fine) or trying to cache the dynamic region too (not fine) — most plugins have a “don't cache for logged-in users” setting that handles this by default, but it's worth confirming rather than assuming.
Multisite and membership plugins complicate the account identifier
A plain WordPress install has one clean concept of “the current user,” but a lot of real sites layer a membership plugin (MemberPress, WooCommerce Subscriptions) or multisite on top, where “account” might mean something different from “WordPress user.” Decide which ID actually maps to the account record your checklist API tracks before wiring anything up — if a membership plugin creates its own customer ID that's distinct from the WordPress user ID, that's the one to pass, not get_current_user_id(). Getting this wrong doesn't throw an error; it silently shows the wrong person's progress, which is the kind of bug that's easy to miss in testing with a single admin account and only shows up once real members log in. If you've handled multi-account identity before, the same reasoning applies as in onboarding for invited B2B users.
What to measure before building more WordPress-specific tooling
There's no general number for how much completion rate changes between a React embed and a plain WordPress one — that depends on the specific theme, caching setup, and how often the audience navigates away mid-flow on full page reloads. What's worth tracking on your own install is completion rate segmented by whether the visitor hit a full page reload between checklist steps, which tells you whether the page-reload friction described above is actually costing completions or whether it's a non-issue in practice. Try the integration end to end in the preview environment first, with the same account ID logic you plan to ship, before enqueueing the script on a live page.