Open the console

Embedding an onboarding checklist in a Vue app

Vue treats unknown elements as potential custom elements once you tell it to. Here is the one config line and the lifecycle hook that make this work cleanly.

Embedding an onboarding checklist in a Vue app

The onboarding checklist widget mounts as a custom element, <gs-checklist>, which Vue's compiler does not recognize as one of its own components by default — and by default, an unrecognized tag in a Vue template produces a console warning about an unknown element, even though it works fine at runtime. The fix is one line of Vue configuration, not a wrapper component.

Telling Vue's compiler to leave it alone

Vue's isCustomElement option (in vite.config for Vite-based apps, via the Vue plugin options) tells the compiler which tag names are custom elements it should pass through untouched rather than resolve as components:

// vite.config.js
import vue from '@vitejs/plugin-vue';

export default {
  plugins: [
    vue({
      template: {
        compilerOptions: {
          isCustomElement: (tag) => tag === 'gs-checklist',
        },
      },
    }),
  ],
};

Loading the script in a component

Load the embed script inside onMounted, same reasoning as any DOM-dependent script in a component lifecycle — running it earlier risks the script executing before the element it targets exists in the DOM:

import { onMounted } from 'vue';

onMounted(() => {
  const s = document.createElement('script');
  s.src = 'https://gettingstarted.marthaia.com/embed.js';
  s.defer = true;
  document.body.appendChild(s);
});

Passing reactive props to a custom element

Vue binds attributes to custom elements the same way it binds them to native HTML elements — :user-id="currentUser.id" works and updates the attribute when currentUser.id changes. The one thing to verify is that the widget actually re-reads an attribute change after its first mount; if it only reads user-id once at initialization, a user id that is not yet known at first render (an async auth check still in flight) needs a v-if guard rather than relying on a later attribute update to fix it.

What not to do

Do not wrap the custom element in a Vue component purely to "Vue-ify" it unless you need to pass computed or transformed props — a thin wrapper that just forwards props adds a layer with no behavior, and makes the one layer that actually matters (the script load) easier to duplicate if the wrapper gets used in two places.

What to measure instead of guessing

Nobody has compared completion rates between a Vue SPA and other frameworks for this widget — there is no reason to expect a difference, since the widget's own state logic runs identically regardless of the host framework. What is actually worth checking on your integration: that the script loads once per app lifetime, not once per route in apps using Vue Router, which is the realistic bug to watch for.

See the docs for the embed script reference, and the live preview for a working instance.

Try it on your app