DocsReference

Embed script reference

How embed.js loads, what it stores in the browser, the events it sends and keyboard support.

How it loads

  1. The script reads data-site-key from its own tag. Without one, it does nothing.
  2. It requests the active tours for the current URL path from app.lovelysomething.com.
  3. If none match (or the account is over its monthly views), it stops — nothing is added to the page.
  4. Otherwise it checks display conditions, picks the tour to show, injects its styles and renders the launcher, welcome card and step UI.

All tour UI is added at the end of <body>, with ids and classes prefixed ls-, so it won’t collide with your CSS.

The script follows client-side navigation via history.pushState, replaceState, popstate and a DOM observer. When the path changes it removes the current tour and loads the tours for the new path.

Keyboard

KeyAction
→Next step
←Previous step
EscClose the tour, or the welcome card

Browser storage

The script sets no cookies. It remembers per-visitor state in localStorage on your domain, keyed by walkthrough id:

KeyStores
ls-guide-dismissed-<id>The visitor clicked “Don’t show again”.
ls-guide-completed-<id>The visitor finished the tour (used by prior-tour conditions).
ls-guide-shows-<id>How many times the tour showed itself automatically (for max shows and “seen” conditions).
ls-guide-autolaunch-<id>How many times it auto-launched.
ls-carousel-shows-<id>How many times the splash carousel showed.
Tip
To see a tour as a first-time visitor again, clear these keys in DevTools → Application → Local Storage, or use a private window.

Network requests

RequestWhen
GET /api/walkthrough/<siteKey>?path=…On load and on each path change.
POST /api/eventsFor each analytics event. Sends the tour id, event type, step number and a random per-page-view session id.

Visual Editor live preview

When the Visual Editor extension saves steps, it posts a message to the page and the open tour redraws without a reload. Only messages from the same window, for the tour already loaded, are accepted, and nothing is saved by the page itself.

Removing Tooltip Tour

Delete the script tag. Nothing else is left behind except the small localStorage entries above.

The snippet
<script src="https://app.lovelysomething.com/embed.js" data-site-key="sk_xxxxxxxxxx" async></script>
Something missing or unclear? Tell us and we’ll fix the page.