Add a changelog widget to Vue

Lytmark is an in-app changelog, public roadmap and feature-voting widget for SaaS products and web apps. Add a “What’s new” panel, an ideas box and roadmap voting to your product with one line of code, for a flat monthly price with no per-user limits.

This guide adds it to a Vue 3 app (Vite): one line in index.html, or loaded once from App.vue. You’ll get a “What’s new” panel with an unread badge and one-tap reactions on every update. On Pro, the same widget also gets Roadmap and Ideas tabs.

Before you start

  • A free Lytmark accountSign up at app.lytmark.com. No card needed.
  • Your project IDIt’s on the Install page of your dashboard, already filled into the snippet.
  • About 5 minutesOne line of code, pasted once for the whole site.

Install steps

Pathindex.htmlbefore </body>

  1. Copy your snippet

    In your Lytmark dashboard, open Install and copy the snippet. Your project ID is already filled in there; in the examples on this page it’s YOUR_PROJECT_ID.

    Your snippet
    <script src="https://api.lytmark.com/widget.js" data-id="YOUR_PROJECT_ID"></script>
  2. Paste into index.html

    Easiest: paste the snippet before </body> in index.html (Vite).

    index.html
    <!-- index.html -->
    <body>
      <div id="app"></div>
      <script type="module" src="/src/main.js"></script>
      <script src="https://api.lytmark.com/widget.js" data-id="YOUR_PROJECT_ID"></script>
    </body>
  3. Or load it from App.vue

    Or load it once from your root component, App.vue:

    App.vue
    <!-- App.vue -->
    <script setup>
    import { onMounted } from 'vue';
    
    onMounted(() => {
      if (document.querySelector('script[src="https://api.lytmark.com/widget.js"]')) return;
      const s = document.createElement('script');
      s.src = 'https://api.lytmark.com/widget.js';
      s.async = true;
      s.dataset.id = 'YOUR_PROJECT_ID';
      document.body.appendChild(s);
    });
    </script>
  4. Deploy, then open it

    Deploy, then open your app once. The Install page in your dashboard turns green when the widget loads for the first time.

Use your own button

Prefer a button in your own navigation over the round one? Any element with data-lytmark-trigger opens the widget:

Vue
<!-- Any component -->
<template>
  <button data-lytmark-trigger>What's new</button>
</template>

On pages that have a trigger the round button hides by itself. To hide it everywhere, add data-position="none" to the snippet (in App.vue: s.dataset.position = 'none'). While there are unread posts, the widget sets data-lytmark-unread on your button, so you can style your own dot.

Check that it works

Open the Install page in your Lytmark dashboard. The first time the widget loads on your site, its status turns green: Live on followed by your site’s host. On your site, the round button appears in the corner you picked in the dashboard (bottom right by default); click it to open the “What’s new” panel.

Using data-consent="pending" or data-track="false"? Then the check waits too: the widget reports your host only once tracking is allowed.

Not showing up?

You haven’t deployed yet

The widget loads wherever the snippet runs. Deploy, then open the deployed site. A local dev server works too: the Install page lists it as a local host.

Your browser shows an old version

Hard-refresh (Ctrl/⌘ + Shift + R) or open the site in a private window. If you use a CDN or cache plugin, purge it.

The code is only on one page

Put it in the shared layout, footer or site-wide settings so every page loads it. The status turns green as soon as any page with the code is opened.

An ad blocker or privacy extension hides it

Try a private window with extensions off. Most visitors don’t block it; this mostly affects your own browser.

Your site has a Content Security Policy

Allow https://api.lytmark.com in script-src and connect-src. Post images come from api.lytmark.com and media.lytmark.com.

CSP
script-src 'self' https://api.lytmark.com;
connect-src 'self' https://api.lytmark.com;
img-src 'self' https://api.lytmark.com https://media.lytmark.com;

Videos in posts also need frame-src; see the full list.

Vue changelog widget FAQ

Should I use index.html or App.vue?

index.html is the easiest: the widget loads once and survives route changes. Use App.vue when you’d rather keep it in code; load it once from the root component, not from every page.

Does it work with Vue Router?

Yes. Loaded once, the widget stays on screen through client-side navigation.

Will it slow down my Vue app?

The snippet adds a small loader, which loads the widget asynchronously. The widget is under 30 KB gzipped and draws inside Shadow DOM, so your styles and its styles never touch.

Can I show it only to logged-in users?

There’s no setting for it in Lytmark: the widget shows on every page where the snippet runs. Load it only in the part of your app behind sign-in, for example by loading it from the component that wraps your signed-in pages. To tell the widget who is signed in, so votes and ideas need no typed email, call Lytmark.identify(); see identify signed-in users.

Add Lytmark to Vue today.

Free plan, no card. Live in about five minutes.