videobana-live-guides · Explains bana.js, the one script that brings Videobana into any website: live tours that play on the real interface (spotlight, a pointer that clicks, types and presses keys, narration), intro and ending steps, tours written as HTML attributes, JSON or JavaScript, hands-on mode, links that start tours, hotspots, video pop-ups, the Guides button and how everything looks, every script-tag option, the JavaScript API and events, the guide recorder, and the in-app kit: an onboarding checklist that ticks itself off, announcements with video for chosen visitors, an Ask box that starts a walkthrough at the step that answers (optional AI answers), help for visitors who look stuck, surveys (NPS, CSAT, polls) and a feedback button with screenshots, identify and track, and events sent to the site's analytics. Use it when adding guided tours, onboarding, checklists, announcements, in-app help, surveys, feedback, hotspots or video pop-ups to a web app, when changing how they look, or when writing or debugging a tour.
One script, https://videobana.vercel.app/bana.js, brings Videobana inside a website: narrated step-by-step tours that play on the real interface like a video (the page dims around a spotlight that glides from element to element, a pointer travels to each control and clicks it, types into it or presses its keys, and a card names the step while the narration is said and shown as text), hotspots on new features, video pop-ups, a Guides button that lists the guides of each page, links that start any of these from anywhere, and the guide recorder that turns doing a task into a tour. Tours are written in the page (attributes, JSON, JavaScript) or recorded and kept in Videobana as walkthroughs (see the videobana-walkthroughs skill). The script is small; the recorder is a second file loaded only when someone records. It runs in a shadow root, so the page's CSS cannot break it and it cannot break the page.
Add the script once per page (or in the app's layout), mark the steps, and link to the tour:
html
<script src="https://videobana.vercel.app/bana.js" data-launcher="Guides" defer></script>
<!-- 1. Mark the steps of a tour on your own elements -->
<input data-bana-tour="welcome" data-bana-step="1"
data-bana-title="Search"
data-bana-say="Find any project by its name." />
<button data-bana-tour="welcome" data-bana-step="2"
data-bana-say="Start something new here."
data-bana-action="click">New project</button>
<!-- 2. Start it from any link (or let the Guides button list it) -->
<a href="#bana-tour=welcome">Take the tour</a>
Attributes travel with the markup: a component that renders a step carries it into every page it appears on. Steps are put in order by data-bana-step, then by their place on the page. The tour's own options can be written on any of its steps.
Attribute
What it does
data-bana-tour
The tour the element is a step of (letters, digits, - and _). An element can be in several: intro billing.
data-bana-step
Its place in the tour (1, 2, 3…). Steps without it follow the order of the page.
data-bana-title
The title on the step's card. Left out: the element's own name (its label, aria-label or text).
data-bana-say
What the voice says, shown as text on the card that lights up word by word as it is said. Left out: the title is said.
data-bana-text
A line of detail under the title.
data-bana-action
click, type or keys: the pointer clicks the element, types into it or presses keys. Left out: it is pointed at.
data-bana-type
The text a type step types (up to 60 characters).
data-bana-keys
The keys a keys step presses: Ctrl+K, Enter.
data-bana-placement
top, bottom, left or right: where the card goes. Default auto, the side with room.
data-bana-hold
Seconds the step stays after its narration (default 0.7).
data-bana-perform
Do the action for real, so the page follows: the menu opens, the field fills in, the dialog appears. Leave it off for what saves or creates something.
data-bana-tour-title
On any step: the title of the tour, in the help panel and on its cards.
data-bana-tour-mode
On any step: try makes the tour hands-on (it waits for the visitor to do each action).
data-bana-tour-advance
On any step: with the voice, manual waits for Next after each step; auto (default) goes on by itself. Visitors can switch with the Auto button.
data-bana-tour-text-advance
On any step: with text only, manual (default) waits for Next; auto goes on by itself once a step has been up long enough to read (the bar on the card fills as the time runs out). Visitors can switch with the Auto button.
data-bana-tour-text-seconds
On any step: the seconds each text-only step stays when it goes on by itself (2 to 60). Left out: the time its words take to read, at least 3 seconds.
data-bana-tour-voice
On any step: browser reads the tour with the browser's voice (a voice walkthrough); none (default) is a text-only tour.
data-bana-tour-text-only
On any step: false keeps a tour that has a voice to its voice, with no text-only button on the card. Default: both are offered.
data-bana-tour-start-with
On any step: voice (default) or text: the way the tour starts in when it offers both. A visitor who switches keeps their own choice, and it wins.
For elements that cannot be marked (a third-party widget, markup you do not own) or tours built from data. Targets are CSS selectors (in JavaScript also an element, or a function returning one).
html
<script type="application/bana+json">
{
"tours": [
{
"id": "invite",
"title": "Invite your team",
"mode": "try",
"steps": [
{ "kind": "intro", "title": "Invite your team",
"text": "Four steps, about 20 seconds." },
{ "target": "#members", "title": "Members", "say": "Your team lives here." },
{ "target": "[data-testid=invite]", "title": "Invite", "action": "click",
"say": "Press Invite to add someone." },
{ "target": "input[name=email]", "title": "Their email", "action": "type",
"type": "sam@company.com", "say": "Type their work email." },
{ "target": "form button[type=submit]", "title": "Send", "action": "keys",
"keys": ["Enter"], "say": "Press Enter, and the invite is on its way." },
{ "kind": "outro", "title": "Invite sent",
"text": "They get an email with a link to join." }
]
}
]
}
</script>
js
const tour = Bana.tour({
id: "billing",
title: "Your billing settings",
lang: "en-GB",
steps: [
{ target: "#plan", title: "Your plan", say: "This is the plan you are on." },
{ target: () => document.querySelector(".invoice-row"), title: "Invoices",
say: "Every invoice, ready to download." },
],
});
// Start it when you like: after sign-up, from a menu, from your onboarding checklist…
tour.start(); // where the visitor left off; Bana.start("billing", 0) always starts over, ("billing", 1) at the second step
// Know what happened
Bana.on("tour-complete", ({ tour }) => analytics.track("Tour finished", { tour }));
Bana.onSkip(({ tour, index }) => analytics.track("Tour skipped", { tour, step: index }));
Field
What it is
id
Names the tour in links (#bana-tour=<id>) and events. Required.
title
Shown on the cards and in the help panel.
description
Shown in the help panel, searchable.
steps[].kind
intro on the first step: a welcome card in the middle of the page that says what the tour shows, with how many steps and how long, and a Start button. outro on the last step: a closing card, whose words end the tour (with Watch again and Close). Neither has a target or an action, and neither is counted in 2 / 5.
steps[].target
A CSS selector, an element, or a function that returns one. Left out: the card sits in the middle, for a step about the whole page.
steps[].title / say / text / action / type / keys / placement / hold / perform
As the attributes above. keys on a type step are pressed after typing (Enter). The title is optional, like the detail (text) and the narration (say): a step needs at least one of the three, and a step with no title shows no heading on its card.
steps[].label
The element's name (its label or text): it is found by it when the selector no longer matches.
mode
show (default) plays by itself like a video. try waits for the visitor to click, type or press each step on the real page.
advance
With the voice: auto (default) goes on once a step is said, manual waits for Next.
textAdvance
With text only: manual (default) waits for Next, auto goes on once a step has been up long enough to read.
textSeconds
The seconds each text-only step stays when it goes on by itself, 2 to 60. Left out: the time its words take to read (at least 3 seconds).
voice
none (a text-only tour, default), browser, or { kind: "audio", src } for a recording: the voice walkthrough. Walkthroughs saved in Videobana bring the standard or premium voice you recorded.
textOnly
true (default): a tour with a voice also offers the text-only way, with a button on the card to switch to it. false keeps it to its voice. A tour without a voice is text only, whatever this says.
startWith
voice (default) or text: the way the tour starts in when it offers both. A visitor's own choice, once they switch, is remembered and wins.
lang
The language of the voice (de, pt-BR…). Default: the page's lang.
autostart
true: starts by itself when the page loads, for visitors who have not finished, closed or skipped it; one who left it half way continues where they were. Only on the page it belongs to when it has one (page).
Value
Allowed
steps[].action
none, click, type, keys
steps[].kind
intro, outro
steps[].placement
auto, top, bottom, left, right
mode
show, try
advance
auto, manual
textAdvance
auto, manual
Limits: a title up to 48 characters, a detail (text) up to 150, a narration (say) up to 500, typed text up to 60, at most 4 keys of up to 10 characters each (Ctrl+K, Enter). Longer text is cut.
A step needs a title or a narration (the title is then taken from it); without either it is left out. The action is worked out when not given: text to type makes it type, keys make it keys, otherwise none (pointed at).
hold is the pause after the narration, 0 to 20 seconds (default 0.7).
advance is for the voice (default auto: it goes on once a step is said); textAdvance is for text only (default manual: it waits for Next; auto goes on once a step has been up long enough to read, textSeconds seconds (2 to 60) or the time its words take to read). Visitors switch with the Auto button, and their choice is kept for each way.
perform: true does the action for real so the page follows (a menu opens, a dialog appears). It is off by default for tours written in a page; recorded walkthroughs turn it on except for what saves, creates or deletes.
A tour id is lowercased and kept to letters, digits, - and _ (other characters become -), at most 64 characters; without an id the title is used.
Intro and ending steps
Optional, and about the tour rather than an element. The first step may be kind: "intro": a welcome card in the middle of the page with its title and detail, how many steps and about how long (“5 steps · about 40 s”), and a Start button. The last step may be kind: "outro": a closing card; when it is over the visitor ends on its words with Watch again and Close. Both ignore any target, action, type or keys, sit in the middle of the page, and are not counted in the “2 / 5” of the steps. An intro anywhere but first (or an outro anywhere but last) plays as a plain step and is reported as a problem. Narration that only repeats the title and detail is not shown again as text.
json
{ "kind": "intro", "title": "Invite your team", "text": "Four steps, about 20 seconds." }
{ "kind": "outro", "title": "Invite sent", "text": "They get an email with a link to join." }
How a tour plays
show (default) plays by itself like a video; try is hands-on: it shows each action and waits until the visitor has clicked, typed or pressed it on the real page (its Skip step button goes on without).
advance: "auto" goes on when a step has been said; "manual" waits for Next (“Press Next when you are ready.”). It is for the voice walkthrough. Text only has its own: textAdvance: "manual" (default) waits for Next, "auto" goes on once a step has been up long enough to read (textSeconds, or the time its words take to read), the bar on the card filling as the time runs out. Visitors switch with the Auto button, and their choice is remembered for every tour, for each way.
The card has a progress bar, Previous, Pause/Play, a sound button (when there is a voice), Auto, and Next (Start on the intro, Finish on the last step); under them, Skip tour (every step but the last) and the button that switches between the voice and text only. Keyboard: → and ← go to the next and previous step, Escape closes the tour (not while the visitor is typing in a field).
A step whose element is not on the page waits up to 4 seconds for it (it may still be loading), finds it again by its recorded name and tag when the selector no longer matches, and can open a menu that reveals it on hover. Without it, the card sits in the middle.
A step that loads another page goes on there, when that page has the script (the place is kept in sessionStorage).
A step whose path is another page goes there first: through the page's own link to it when there is one (a single-page app shows the page and the tour keeps playing), else by loading it (the tour goes on there). So a walkthrough across pages can start, or go back a step, from any page. A page the tour loaded that sends the visitor elsewhere is not loaded again in that session.
Voices: none (a text-only tour), the browser's voice (browser), or a recording ({ kind: "audio", src }, each step playing its own part). Walkthroughs saved in Videobana bring the standard or premium voice recorded with the account. Sound is refused by browsers before any click on the page: the tour then waits with “Your browser plays sound after a click: press Play.”, and Play lets it through.
Pause and Play keep the place. The recorded voice goes on from the second where it stopped; the browser's voice goes on from the word it had reached; the text, the pointer and the timing wait too. A step is never started over by a pause.
Auto-start, when a tour is started by a link, a button or Bana.start(), and where the visitor left off: see below.
Voice or text only
A tour with a voice also offers a text-only way (textOnly: true, the default; false keeps it to its voice; as attributes, data-bana-tour-text-only and data-bana-tour-start-with). The card then has a button to switch (Text only / Play with voice), at any moment, on the same step: the step goes on in the other way without doing its action on the page twice. The tour starts in its startWith (voice by default, or text); once a visitor switches, their choice is remembered for every tour of the site and wins. A tour without a voice (or in a browser that cannot speak) is text only and shows no button.
Voice: the text lights up word by word, gray to ink, in step with the voice; the tour goes on by itself (Auto-play) or waits for Next.
Text only: nothing is said and nothing is revealed gradually: the whole text is in plain ink at once. It waits for Next (textAdvance: "manual", the default), or goes on by itself once a step has been up long enough to read (textAdvance: "auto", textSeconds or the time its words take), the bar filling as the time runs out and Pause holding it.
Walkthroughs of Videobana set both in the dashboard (Voice & playback → How visitors follow it): turn the voice walkthrough and the text-only walkthrough on or off (one always stays on), and choose which starts first.
Progress, skipping and where the visitor left off
On the card
What it does
Voice or text only
A tour that has a voice also offers text only, with a button on the card (Text only / Play with voice) that switches at any moment, on the same step. With the voice, the text lights up word by word as it is said and the tour goes on by itself (or waits for Next); with text only nothing is said, all the words show at once in plain ink, and the visitor presses Next, or the tour goes on by itself once a step has been up long enough to read (textAdvance), its bar filling as the time runs out. The visitor's choice is remembered, for every tour; until they choose, the tour starts in its startWith.
Pause and Play
Pause stops the voice where it is and Play goes on from the same word, not from the start of the step. A browser that refuses sound until the first click pauses the tour with a Play button instead of reading it silently.
Progress
A bar of at most 10 segments, counting every step of the tour (the intro and the ending too). Up to 10 steps, one segment is one step; beyond that each segment stands for a whole or half number of steps, taking segments off until they share the steps evenly (20 steps are 10 segments of 2, 12 are 8 of 1.5, 14 are 7 of 2), and a count that cannot be shared that way (11, 13, 17…) keeps 10 segments that fill one after the other. The 2 / 5 next to it counts the steps.
Skip tour
A link under the card (on every step but the last) ends the tour for good: it is remembered, the tour does not start by itself again, and Bana.onSkip and the tour-skip event tell the page. The Guides button still lists it, and starting it there plays it again. ✕ and Escape only close it for now.
Where they left off
The step is remembered, so starting the tour again (the Guides button, a link, Bana.start(id), or by itself when the page loads) continues there; the card says so and offers Start over. It is forgotten when the tour is finished or skipped, after 30 days, or when the tour changes its number of steps.
What is remembered in the browser
Only in localStorage, keys starting with bana:; no cookie, nothing leaves the browser. A browser that refuses storage just forgets: nothing breaks. Bana.reset(id?) forgets the tours (done, closed, skipped, progress).
Key
What it holds
bana:tours-done
The tours the visitor finished.
bana:tours-closed
The tours they closed with ✕ or Escape before the end.
bana:tours-skipped
The tours they skipped with Skip tour.
bana:progress
Where they left each tour: { step, steps, at }, at most 50 tours.
bana:way
Voice or text only, as they chose with the switch on the card.
bana:advance
Auto-play or Next, as they chose with the Auto button.
bana:muted
The sound switch.
bana:hints-closed
The hotspots they closed with Got it.
Explicit starts always play: Bana.start(id), a link, a data-bana-play button and the Guides button start a tour a visitor skipped or finished again (from where they left off, or the beginning). Only autostart leaves them alone.
Tours being tried out (the recorder's Play live, and a walkthrough opened with its preview link) are never remembered and always start from the beginning.
For the numbers of Videobana a skip counts as a visitor who left at that step (a dismiss).
js
// The visitor chose "Skip tour". The script remembers it (the tour does not start by itself again);
// keep it in your own records too if you like. `index` counts from 0.
Bana.onSkip(({ tour, title, index, steps }) => {
analytics.track("Tour skipped", { tour, step: index + 1, of: steps });
});
// Start it again for them anyway, from a "Show me again" button
document.querySelector("#help-me")?.addEventListener("click", () => Bana.start("welcome"));
Starting by itself
A tour starts by itself when the page loads if it has autostart: true (for a walkthrough of Videobana: Start automatically when the page loads in Voice & playback) or the script tag names it with data-autostart. It only starts on the page it belongs to (a walkthrough's start page), after a short moment, for visitors who have not finished, closed or skipped it, and where they left off when they had started it. One tour at a time, and never over another tour playing. On the script tag: data-autostart="welcome" (that tour), data-autostart alone or data-autostart="page" (the tour made for the page), data-autostart="false" (switch every automatic start off, the ones set in Videobana too, for a page where it would be in the way).
html
<!-- By itself when the page loads: the tour made for each page (for visitors who have not finished, closed or skipped it) -->
<script src="https://videobana.vercel.app/bana.js" data-key="bk_your_site_key" data-autostart defer></script>
<!-- …one tour, by its id -->
<script src="https://videobana.vercel.app/bana.js" data-key="bk_your_site_key" data-autostart="welcome" defer></script>
<!-- …or none: it also switches off the walkthroughs that are set to start by themselves in Videobana -->
<script src="https://videobana.vercel.app/bana.js" data-key="bk_your_site_key" data-autostart="false" defer></script>
A link is the simplest integration: in a menu, a help article, a support reply, a product email. The address is put back without the #bana-…, so a reload does not start it again.
Link
What it does
#bana-tour=<id>
Starts the tour where the visitor left it (from the beginning when they have not started it, or finished or skipped it); from a link on another page, it starts when that page opens.
#bana-tour=<id>&step=<n>
Starts it at step n, counted from 1 (step=1 always starts over).
#bana-tour=<id>&preview=<token>
Plays a walkthrough of Videobana that is not live yet, for its owner to test (the token comes with its test link).
#bana-video=<source>
Opens the video in a pop-up player.
#bana-record
Opens the guide recorder.
html
<!-- Start a tour of this page -->
<a href="#bana-tour=welcome">Show me around</a>
<!-- …from its third step -->
<a href="#bana-tour=welcome&step=3">How do I share?</a>
<!-- A plain link picks the tour up where the visitor left it; step=1 always starts over -->
<a href="#bana-tour=welcome&step=1">Watch it from the start</a>
<!-- From another page, an email or a help article: the tour starts when the page opens -->
<a href="https://app.example.com/projects#bana-tour=welcome">Open the guided tour</a>
<!-- Any element can start a tour or open a video -->
<button data-bana-play="welcome">Take the tour</button>
<!-- One "Take a tour" button for every page: it starts the tour made for the page the visitor is on -->
<button data-bana-play="page">Take a tour</button>
<button data-bana-video="example:ai-make-a-video-with-videobana">Watch the 1-minute intro</button>
<!-- A video in a pop-up from a plain link -->
<a href="#bana-video=3fa2c9e01b7d4e55">What's new this month</a>
Any element: a click starts that tour (a tour of the page, or a walkthrough of Videobana by its 16-digit id, loaded first). data-bana-play="page" starts the tour made for the page the visitor is on (a walkthrough whose start page it is; one that stays on the page wins over one that goes on to others), so one "Take a tour" button serves every page.
data-bana-video="<source>"
Any element: a click opens the video in a pop-up player with its voice-over and captions.
data-bana-label="<text>"
With data-bana-video: lists the video in the help panel under this name.
data-bana-redact
Hides the element on every screenshot the recorder takes (blurred). data-bana-redact="cover" paints over it instead, for secrets.
data-bana-id="<name>"
A stable name for the recorder: it is the first thing the recorder's selectors use (before data-testid, data-test-id, data-test, data-cy, data-qa, ids, names and labels).
Video sources
A video id (16 hexadecimal digits) of a video made public in Videobana: read from /api/public/videos/<id>.
example:<id> (or a bare id with dashes such as ads-videobana) for one of the demos: read from /api/examples/<id>.
An address: https://… as it is, or a path on the platform (/api/…) that returns a video document as JSON.
A pulsing dot on an element whose tip can start a tour or play a video; Got it hides it for good for that visitor. data-hints="false" on the script tag turns them all off.
Attribute
What it does
data-bana-hint
Puts a pulsing dot on the element; the value is the tip shown when it is hovered or focused.
data-bana-hint-tour
The id of a tour the tip starts (a button in the tip).
data-bana-hint-video
A video the tip plays in a pop-up (same sources as data-bana-video).
data-bana-hint-position
The corner of the element the dot sits on: top-left, top-right (default), bottom-left, bottom-right.
data-bana-hint-id
Names the hotspot so that “Got it” is remembered for it even when its text changes.
html
<button data-bana-hint="New: export straight to Google Drive."
data-bana-hint-tour="export"
data-bana-hint-video="example:ai-make-a-video-with-videobana">Export</button>
<!-- Hide private details from every screenshot the recorder takes -->
<span data-bana-redact>ada@example.com</span>
<code data-bana-redact="cover">sk_live_…</code>
Your account's site key (Tools → Add to your site): every walkthrough you make live for this site is loaded from Videobana by itself, with the look you chose in Appearance.
data-walkthroughs
Walkthroughs of Videobana to load by id, separated by commas.
data-voice
browser reads the tours written in the page with the browser's voice; text only when left out.
data-lang
The language of every tour's voice, unless a tour says otherwise.
data-autostart
Starts a tour by itself when the page loads, for visitors who have not finished, closed or skipped it (one who left it half way continues where they were). The value is the tour's id; alone (or page) it is the tour made for the page; false switches every automatic start off, the ones set in Videobana (Start automatically when the page loads) included. Left out: each tour decides.
data-recorder
Lets the people who write the guides open the recorder with Alt + Shift + R.
data-platform: the Videobana address to talk to when the script is served from elsewhere (default: where the script came from).
data-key must look like bk_ followed by 8 to 40 letters, digits, _ or -; anything else is ignored.
Colours, light or dark, corners, text size, typeface, the Guides button (its words, shape, icon, corner, distance from the edges, phones, the dot) and the words in its panel are chosen once per account in Tools → Look & feel (https://videobana.vercel.app/tools?tab=appearance), with a live preview on a real page. Saving puts the look on every site with the script within a couple of minutes: the site's script tag does not change. A site can also set any of it itself, with attributes on the script tag or Bana.configure(); what the tag says wins over what the account chose, and Bana.configure() wins over both.
Attribute
What it does
data-launcher
Shows the Guides button in a corner, which lists every tour and video of the page. Its value is the label (data-launcher="Need help?"); alone it reads Guides; false hides it.
data-launcher-position
right (default) or left.
data-launcher-style
pill (default: icon and words) or round (icon only).
data-launcher-icon
help (default), compass, sparkles, book or lightbulb.
data-launcher-bottom
Pixels between the button and the bottom of the window, 8 to 200 (default 20): raise it above a chat button.
data-launcher-edge
Pixels between the button and the side of the window, 8 to 200 (default 20).
data-launcher-mobile
false hides the button on phones (windows under 640 pixels).
data-launcher-dot
false removes the dot that says there is a guide the visitor has not watched.
data-heading
The title of the Guides panel (default “Help on this page”).
data-intro
The line under that title.
data-accent
The brand colour: the cards' buttons, the spotlight and the Guides button (#0ea5e9, rgb(…), oklch(…)).
data-accent-2
The second colour of the gradients. Default: the accent.
data-theme
dark (default), light, or auto, which follows the visitor's device.
data-radius
square, soft (default) or round: how round the cards, buttons and spotlight are.
data-size
compact, default or large: the text and the width of the cards.
data-font
system (default), site (the font your page uses), serif or mono.
data-dim
How much the page darkens around what a step points at: off, light, medium (default) or strong.
data-pointer
false hides the arrow that glides to each element.
data-hints
false turns the hotspots off.
data-branding
false removes “Made with Videobana” from the Guides panel.
Colours accept hex (#0ea5e9, 3 to 8 digits), rgb(), rgba(), hsl(), hsla(), oklch() and oklab(); anything else is ignored. The Guides button's label is at most 32 characters; data-launcher alone (or true) reads Guides. The title of the panel is at most 40 characters and the line under it 120.
The Guides button lists every tour and video of the page (searchable, with how many steps and how long, and a tick on those watched), and “Made with Videobana” unless data-branding="false". It is only drawn when there is something to list.
The account's look is served with its walkthroughs: GET /api/public/walkthroughs?key=… answers { walkthroughs, appearance } (appearance is null until the account chose one).
js
// The look can also come from your code. It wins over what the account chose.
Bana.configure({
accent: "#0ea5e9", // the brand colour…
accent2: "#6366f1", // …and a second one for gradients
theme: "auto", // "dark", "light" or "auto" (the visitor's device)
radius: "round", // "square", "soft" or "round"
size: "large", // "compact", "default" or "large"
launcher: "Need help?", // the Guides button's words (null hides it)
launcherStyle: "round", // "pill" (icon and words) or "round" (icon only)
launcherSide: "left",
launcherBottom: 88, // above a chat button
});
The script defines window.Bana. Code that runs before it can queue calls: window.Bana = window.Bana || []; Bana.push((bana) => bana.start("welcome")). Every event is also a bana:<type> event on document, for analytics.
Method
What it does
Bana.tour(definition)
Adds a tour (or replaces the one with its id) and returns { start(step?), stop() }.
Bana.start(id, step?)
Starts a tour of the page, or a walkthrough of Videobana by its id (loaded first). Without step it picks up where the visitor left it, and begins at the start when they never started it or finished or skipped it; step counts from 0, so Bana.start(id, 0) always starts over. Bana.start("page") starts the tour made for the page the visitor is on.
Bana.pageTour(path?)
The tour made for a page (this one by default): a walkthrough whose start page it is, preferring one that stays on that page over one that goes on to others.
Bana.load(id)
Loads a live walkthrough of Videobana without starting it (it is then listed in the help button).
Bana.stop()
Closes the tour that is playing.
Bana.tours()
Every tour of the page: from attributes, JSON blocks and code.
Bana.video(source, { title })
Opens a video in a pop-up: a public video id, example:<id>, or the address of a video's JSON.
Bana.record()
Opens the guide recorder.
Bana.scan()
Reads the page again. It happens by itself when the page changes; call it to be sure after drawing a new screen.
Changes the look and the options from code (every data- option above has a name in camelCase: accent, accent2, theme, radius, size, font, dim, pointer, launcher, launcherStyle, launcherIcon, launcherSide, launcherBottom, launcherEdge, launcherMobile, launcherDot, heading, intro, hints, branding, lang). It wins over the script tag and the account.
Bana.launcher.open() / .close()
Opens or closes the Guides panel, for a “Help” link of your own.
Bana.reset(id?)
Forgets that the visitor finished, closed or skipped a tour (or all of them), and where they left each, and shows closed hotspots again.
Bana.on(type, listener)
Listens to an event; returns a function that stops listening.
Bana.onSkip(listener)
Calls listener({ tour, title, index, steps }) when a visitor chooses Skip tour (index is the step they were on, from 0). The same as Bana.on("tour-skip", …); returns a function that stops listening. The script already remembers the skip, so the tour does not start by itself again: use this to keep it in your own account of the user as well.
Event
When, and its detail
ready
The script has read the page. { version }
tour-start
A tour started. { tour, title }
step
A step is shown. { tour, index, title, element }
tour-complete
The visitor reached the end. { tour }
tour-dismiss
The visitor closed it (✕ or Escape) before the end: where they were is kept, so it continues there next time. { tour, index }
tour-skip
The visitor chose Skip tour: it is closed for good and does not start by itself again. { tour, title, index, steps }
tour-close
The tour's card is gone, finished, closed or skipped. { tour }
The same script shows the account's in-app kit (set in Tools → Checklist, Announcements and Answers & help, served with its walkthroughs: GET /api/public/walkthroughs?key=… answers { walkthroughs, appearance, engage }), or one a page gives in code with Bana.engage(kit). The human guide is https://videobana.vercel.app/docs/in-app.
Onboarding checklist: at the top of the Guides panel, items each with a button (start a walkthrough, play a video, open a page) and a rule for when it is done; a ring fills as they go, confetti at the end, it can open by itself on a first visit.
Announcements: a banner, a corner card or a pop-up, with a picture or a Videobana video that plays in place and a button; for everyone, first-visit or returning visitors, traits from Bana.identify, chosen pages, days and frequency. At most one banner and one card or pop-up at a time, never over a tour. Listed ones make up What's new in the Guides panel, with a count on the button.
Ask: the Guides panel's search becomes a box that searches the words of every step and starts the best walkthrough at the step that answers (Show me). With AI answers on, Enter also gets two or three sentences from the account's live walkthroughs only (POST /api/public/assist, paid from the account's AI allowance, limited per visitor and site).
Help when stuck: four quick clicks on one spot, or a long pause on a page with an unseen walkthrough, offer the page's walkthrough and the Ask box (once per page, twice per visit).
Surveys: one question in a corner card or a pop-up (NPS, satisfaction as faces, stars or numbers, effort, was this helpful, a poll, an open question), shown when its moment comes (seconds in, Bana.track(name), a walkthrough finished, about to leave, after scrolling, or only Bana.survey(id) and #bana-survey=<id>), to a share of visitors, at most one every few days per person. The score is sent at once, a follow-up asks why in words that follow the score, and the thank-you can carry a button (a review link for promoters). Each survey has a page in Tools → Surveys with its results (NPS, averages, response rate, trend per day), every answer one by one, and the AI's themes.
Feedback buttons (up to five, each with its own words, kinds of feedback, pages and messages): a tab on the edge of the page (or a line in the Guides panel, data-bana-feedback with data-bana-feedback-button to name one, #bana-feedback with &button=<id>, Bana.feedback({ button })) opens a form: a kind of feedback, words, the part of the page pointed at (a selector), a screenshot the visitor marks up and blurs in their browser, and the page's details (browser, window, last errors, the steps before: what was clicked, never what was typed). Messages land on the button's page in Tools → Feedback button, and in the Inbox with the other unread ones (POST /api/public/feedback), where each copies as a bug report (Markdown).
Analytics: events go to the analytics on the page as bana_<event> (Google Analytics, Tag Manager, Segment, PostHog, Mixpanel, Amplitude, Heap, Plausible, Umami).
The checklist
Field
What it does
title, intro
The card's title (up to 40 characters) and the line under it (120).
items
Up to 10. Three to five works best.
pages
The pages it shows on (/projects/*); empty for every page.
autoOpen
Opens the Guides panel on it by itself, once, on a visitor's first visit.
celebrate
Confetti when the last item is done (not for visitors who asked their system for less motion).
Item field
What it does
id
Names the item for good: what a visitor did is remembered by it. Lower-case letters, digits and dashes.
title
What to do, in a few words (up to 80 characters).
text
Optional: why, or how long it takes (up to 200).
action
Its button: { kind: "tour", tour } (a walkthrough's id, a tour of the page, or page), { kind: "video", source }, { kind: "link", url, newTab } (a page of the site, a #bana-… link or an https address), or { kind: "none" }.
done
When it counts as done: auto (when the visitor does what the button offers: finishes the tour, opens the video, follows the link), { kind: "visit", path } (a page, * for anything), { kind: "click", selector } (anything that matches, anywhere), { kind: "event", name } (your code calls Bana.track(name)), or manual (the visitor ticks it).
js
// A checklist in your own code takes the place of the account's (Tools → Checklist)
Bana.checklist({
title: "Get started",
intro: "Four things, about five minutes.",
autoOpen: true,
items: [
{ id: "tour", title: "Take the 1-minute tour", action: { kind: "tour", tour: "page" } },
{ id: "video", title: "Watch the intro", action: { kind: "video", source: "example:ai-make-a-video-with-videobana" } },
{ id: "project", title: "Create a project", action: { kind: "link", url: "/projects/new" },
done: { kind: "event", name: "project-created" } },
{ id: "invite", title: "Invite a teammate", done: { kind: "click", selector: "[data-testid=send-invite]" } },
],
});
// Later
Bana.track("project-created"); // ticks "Create a project"
Bana.complete("invite"); // ticks any item by its id
Bana.checklist().open(); // opens the Guides panel on it
Bana.checklist().progress(); // { done: 2, total: 4, complete: false, items: [...] }
Announcements
Field
What it does
name, enabled
What you call it in Tools (visitors never see it), and whether it is live. One that is off shows nowhere; one whose days have not come shows from its first.
style
banner (a bar across the top), card (a corner, above the Guides button) or modal (a pop-up in the middle).
badge, title, body
A word over the title ("New", "Tip"), the title (up to 80) and the text (up to 400; **bold** and [a link](https://…) work, a blank line starts a paragraph).
media
{ kind: "image", src, alt } (an https picture) or { kind: "video", source } (a Videobana video, played in place with its voice and captions).
cta
A button: { label, action }, with the same actions as a checklist item. Without one, the card has Got it.
audience, traits
everyone, new (first visit) or returning; and traits the visitor must have ([{ key: "plan", value: "free,starter" }], * for any value) from Bana.identify.
pages, sites
Where it shows (* for anything); empty for everywhere.
start, end
The first and last day it shows (YYYY-MM-DD, the visitor's own day).
frequency
once, until-dismissed (every visit until it is closed or its button pressed) or every-visit.
delay
Seconds after the page opens (0 to 120).
listed, date
Also listed under What's new in the Guides panel, dated, with a count on the button until it is read.
js
// One of the account's announcements, by its id, whoever the visitor is
Bana.announce("dark-mode");
// Or one written here: a pop-up with a video and a button that starts a walkthrough
Bana.announce({
style: "modal", // "banner", "card" or "modal"
badge: "New",
title: "Dark mode is here",
body: "Switch it on in **Settings → Look**. It follows your system.",
media: { kind: "video", source: "example:ai-make-a-video-with-videobana" },
cta: { label: "Show me", action: { kind: "tour", tour: "page" } },
});
Ask and help
Switch
What it does
ask
The Ask box at the top of the Guides panel: it searches the words of every step of your walkthroughs (and your videos) as the visitor types, and Show me starts the best one at the step that answers.
ai
On Enter, the AI answers in two or three sentences, only from your live walkthroughs, and picks the step to start at. From the account's AI allowance; limited per visitor and per site; the same question is answered from memory.
placeholder
What the box says before anything is typed (up to 60 characters).
stuck
Offer help to a visitor who clicks one spot 5 times in a row (within 1.5 s): the page's walkthrough and the Ask box.
idle
Offer the page's walkthrough after this many seconds without a click or a key (10 to 600; 0 never), to a visitor who has not finished it.
js
// Open the Guides panel with a question already asked (a "?" button in your app, say)
Bana.ask("How do I invite someone?");
// Offer help now, as when a visitor seems stuck (after an error your app noticed)
Bana.nudge();
Surveys
Field
What it does
name, enabled
What you call it in Tools (visitors never see it), and whether it is live.
kind
nps (0–10), csat (1–5, drawn with style: emoji, stars or numbers), ces (1–7, how easy), thumbs (👍 / 👎), choice (a poll: options, multiple) or text (an open question).
question, lowLabel, highLabel
The question (up to 160 characters) and the words under the two ends of the scale.
followUp
{ enabled, low, mid, high }: one more question after the score, in the visitor's own words. Its wording follows where the score falls (NPS: detractors 0–6, passives 7–8, promoters 9–10). The score is kept even if they skip it.
thanks
{ title, text, cta, ctaFor }: the thank-you, with an optional button (a review link, a walkthrough) shown to everyone (all) or only to happy visitors (high).
trigger
When it shows itself: { kind: "delay", seconds }, { kind: "event", name } (your code calls Bana.track(name)), { kind: "tour", tour } (a walkthrough's id, or any, as it is finished), { kind: "exit" } (the pointer heads for the tabs, on computers), { kind: "scroll", percent }, or { kind: "manual" } (only Bana.survey(id) and #bana-survey=<id>).
audience, traits, pages, sites, start, end
Who is asked and where, the same as announcements.
sample
The share of visitors asked (1 to 100), the same visitors each time.
frequency, recur
once (never again after it showed) or until-answered (up to 3 times, on visits 2 days apart); and after an answer, ask again after recur days (90 is usual for NPS; 0 never).
placement
corner (a card above the Guides button) or center (a pop-up).
js
// One of the account's surveys, now, whoever the visitor is (after a support chat, say)
Bana.survey("nps");
// The moment a survey waits for: "Ask after an app event" → export-done
Bana.track("export-done");
// Or from a link anywhere: an email, a support reply
// https://app.example.com/dashboard#bana-survey=nps
Bana.on("survey-answer", ({ survey, kind, score, band }) => {
myAnalytics.track("Survey answered", { survey, score, band });
});
Feedback buttons
Setting
What it does
name, enabled
What you call it in Tools (visitors never see it), and whether it is live. Make one per place that needs its own words, kinds of feedback or inbox: the app, the docs, the checkout.
placement, side, label
tab (a tab on the edge of every page, left or right, with its words) or panel (a line at the bottom of the Guides panel only).
title, intro, thanks
The form's heading, the line under it, and what the visitor reads once it is sent.
categories
The kinds of feedback (1 to 6): { id, label, icon }, icons idea, bug, praise, question, other.
pin
The visitor can point at the part of the page it is about: you get its name and a CSS selector.
screenshot
The visitor can add a screenshot of the tab (the browser asks once), highlight what is wrong and blur what is private, in their browser, before it is sent.
context
The browser, the window, the language, the last errors of the page and the steps before the report (what was clicked and which fields were typed in, never what was typed).
email
optional, required or off. Never asked of visitors your app identified.
pages, sites
Where the tab shows (* for anything); empty for everywhere. A page shows one button: of those meant for it, the one that names pages of its own comes before one meant for every page, and among equals the first in your order.
Setting
What it does
throttle
A visitor is shown at most one survey in this many days (0 to 30; 7 by default).
Link or attribute
What it does
#bana-announcement=<id>
On any page of your site: shows that announcement when the page opens (a “See what's new” in an email), whoever the visitor is. Each announcement's page in Tools has its link.
#bana-survey=<id>
On any page of your site: shows that survey when the page opens (an email's “Rate us”, a support reply).
#bana-feedback
Opens the feedback form; #bana-feedback=bug with that kind chosen, and &button=<id> for one of several feedback buttons (otherwise the one the page shows).
data-bana-feedback
On any element: a click opens the form, with the kind of feedback its value names.
data-bana-feedback-button
On the same element: which feedback button's form it opens (its id; without it, the one the page shows).
data-bana-redact
On any element: blurred on screenshots from the start (cover paints it over).
html
<!-- Any element of yours opens the form; its value picks a kind of feedback -->
<button data-bana-feedback="bug">Report a problem</button>
<a href="#bana-feedback=idea">Suggest an idea</a>
<!-- With several feedback buttons, name the one to open by its id (without it: the one the page shows) -->
<button data-bana-feedback="bug" data-bana-feedback-button="docs">Report a mistake in the docs</button>
<a href="#bana-feedback=idea&button=docs">Suggest a page</a>
<script>
// From your code, with words to start from (after an error your app caught, say)
Bana.feedback({ category: "bug", text: "The export failed: ", button: "app" });
// Hide anything private from screenshots (password and card fields always are)
// <div data-bana-redact>…</div> or data-bana-redact="cover"
Bana.on("feedback-send", ({ button, category, page, screenshot, pinned }) => {
console.log("Feedback sent", button, category, page, screenshot, pinned);
});
</script>
A page for each, with its numbers
Announcements, surveys and feedback buttons are lists, each item with a page of its own in Tools (/tools/announcements/<id>, /tools/surveys/<id>, /tools/feedback-button/<id>). What is counted is how often each was shown, pressed or closed per day, and the answers and messages visitors chose to send: nothing about a person, no cookie, robots left out. A change reaches visitors within a couple of minutes; the numbers are kept for 120 days.
Of…
Its page shows
An announcement
Overview: how often it was shown, how many pressed its button and how many closed it, day by day over 7, 30 or 90 days, its setup at a glance, and a link that shows it on any page of your site. Edit: its form, with a live preview beside it.
A survey
Overview: the score (NPS, the average rating, the share of 👍 or the votes of a poll), the response rate, how the answers spread, and the pages it was answered on. Responses: every answer, one by one, to read, resolve or archive, with the themes the AI finds in what people wrote. Edit.
A feedback button
Overview: how often its form was opened, how many messages it got, the kinds of feedback, how many had a screenshot, the pages they came from, and the HTML that opens it from a button of your own. Messages: what visitors sent, with the page, the browser and the steps before, to read, resolve, archive or copy as a bug report. Edit.
Who the user is
html
<!-- Once the user is signed in. Works before or after the script has loaded. -->
<script>
(window.Bana = window.Bana || []).push(function (bana) {
bana.identify(user.id, { plan: user.plan, role: user.role });
});
</script>
<!-- When something on the checklist happens in your app -->
<script>Bana.track("project-created");</script>
<!-- Signing out: what follows is an anonymous visitor's -->
<script>Bana.identify(null);</script>
Methods, events and options of the kit
Method
What it does
Bana.identify(id, traits?)
Who the visitor is: their checklist and what they saw are kept for them (what they did before signing in counts too), and announcements can be meant for some traits. Bana.identify(null) on sign-out. Nothing leaves the browser.
Bana.track(name)
Something happened in the app: a checklist item that waits for it is done.
Bana.complete(itemId)
Marks a checklist item done, whatever it waits for.
Bana.checklist(definition?)
With a definition, the page's own checklist takes the place of the account's (null goes back). Answers { open(), progress(), reset() }.
Bana.announce(id | definition)
Shows an announcement now: one of the account's by its id, or one written here. Answers a handle with close().
Bana.ask(question?)
Opens the Guides panel with the question asked in the Ask box.
Bana.nudge(reason?)
Offers help now (stuck or idle), once per page and twice per visit at most.
Bana.survey(id)
Shows one of the account's surveys now, whoever the visitor is and whatever they answered before. False when there is no such survey for this site.
Bana.feedback(options?)
Opens the feedback form, with { category, text } to start from, and { button } to name one of several feedback buttons (otherwise the one the page shows). Resolves false when there is no such button.
Bana.closeFeedback()
Closes the survey or the form that is open (what was written in the form is kept while the page is open).
Bana.engage(kit)
The whole kit from code ({ checklist, announcements, assistant, analytics }): for a site without an account, or to try one. The account's kit wins when it arrives.
Bana.push(fn)
Runs fn(bana): (window.Bana = window.Bana || []).push(…) works before and after the script has loaded.
Bana.visitor
Who the SDK thinks the visitor is, their traits and how many visits they made: for checking a setup.
Event
Detail
checklist-item
{ item, title, done, total }: an item was done.
checklist-complete
{ title, total }: the last item was done.
announcement-show
{ announcement, title, style, from }: shown by itself (auto), opened from What's new (list) or by code (code).
announcement-click
{ announcement, title }: its button was pressed.
announcement-dismiss
{ announcement, title }: closed without pressing it.
ask
{ question, page, matches }: a question was asked (Enter) in the Ask box.
nudge
{ reason, page }: help was offered (stuck or idle).
survey-show
{ survey, kind, from }: shown by its own moment (delay, event, tour, exit, scroll) or by code and links (code).
survey-answer
{ survey, kind, score, choices, band }: answered (the score is sent at once). Never the words.
survey-comment
{ survey, kind }: words were added in the follow-up.
survey-dismiss
{ survey, kind, stage }: closed before answering.
survey-click
{ survey }: the thank-you's button was pressed.
feedback-open
{ from, button }: the form of that feedback button opened (from: tab, panel, attribute, link or code).
feedback-send
{ button, category, page, screenshot, pinned }: sent. Never the words.
Attribute
What it does
data-analytics
off keeps events away from the page's analytics; alone (or on) sends them whatever the account says.
data-nudges
off: never offer help to visitors who seem stuck on this site.
data-ask
The Ask box in the Guides panel without an account kit (it searches the page's own tours and videos).
Open it: on any site with the toolbar icon of the Chrome extension (see below) or the Record a guide bookmarklet (from Tools → Walkthroughs → Set up the bookmark, in Videobana), or on a page with the script with a link to #bana-record, Bana.record(), or Alt + Shift + R when the script tag has data-recorder.
Record, then do the task as usual: every click, typed text, Enter, Escape and shortcut becomes a step, its title and narration written from what the element is (a button “Invite” becomes “Click Invite.”). Alt + click adds a step without doing it, for the Save or Create that should not run while recording. Clicks on plain text and on the recorder itself are never steps; text fields and the browser's own pickers (lists, dates, files) get their click at once; a held press that moves stays a drag.
The recording bar: Pause (use the page without recording), Undo (take back the last step), Stop (or Alt + Shift + R). It shows the last step, can be dragged by its grip (its place is remembered), and recording goes on across the pages of the site.
Point at a step adds one by clicking the part of the page it is about, without doing anything (↑ and ↓ choose the element around it or back).
Each step's Target element is its CSS selector, editable: the recorder says what it finds on the page (one element, several (the first is used), none (fine when the step is on another page), or not a valid selector (the last valid one is kept)), and Pick clicks the element again. The element's name and tag (the fallback when the selector stops matching) follow the target.
Export saves the guide as a .guide.json file (format: "videobana-guide", version: 1: title, description, steps with their selectors and words, hidden selectors, and the screenshots as data addresses, last). Import reads one back, replacing the guide after asking; it also reads the .walkthrough.json the recorder downloads when Videobana's import page cannot be reached. What is read is checked and cut to the recorder's limits, so a file edited by hand cannot break it.
Add an intro and Add an ending (above and below the steps) add the two optional steps about the walkthrough itself, with words written for you.
Details (under the title) holds a short description (shown in the Guides panel and searchable) and how the walkthrough plays: Watch (it plays by itself like a video) or Try it (the visitor does each step). They are kept with the walkthrough and can be changed later in Videobana.
Each step can be edited: title (optional, like the detail and the narration: a step needs at least one of the three), narration, detail, what happens (Point, Click, Type, Keys), the text typed or keys pressed, Do it for real during the tour (off for what saves, creates or deletes), Find, Retake or Take screenshot, ↑ ↓, Delete.
Private details: password fields are covered on every screenshot; Hide area blurs anything else clicked; data-bana-redact in the markup does the same.
Screenshots come from sharing the tab (Chrome and Edge ask once; the Chrome extension takes them itself, without asking). Screenshots as I go takes each one when its step is added (needed for guides across pages); otherwise they can be taken at the end. Without them a walkthrough can still be recorded, played and saved.
Finish: Play live plays it on the page, Code gives the tour as attributes, JSON or JavaScript, Video previews a narrated screencast of it, Save to Videobana keeps it as a walkthrough in the signed-in account (to give it a voice and make it live).
The bookmarklet (drag it to the bookmarks bar; clicking it on a page opens the recorder there, loading the script first when the page does not have it):
The draft is kept in the browser as the author works (steps in localStorage, screenshots in IndexedDB), per site, so a reload or a crash loses nothing and a guide across pages keeps growing.
Selectors the recorder writes prefer what lasts: data-bana-id and test ids, then stable ids, then names and labels (name, aria-label, placeholder, title, alt, for, href, role, type), then the shortest path from the nearest element that has one. Ids made up by frameworks and class names made up by build tools (CSS modules, styled-components) are never used. Each step also keeps the element's name and tag, to find it when the selector no longer matches.
Save to Videobana hands the walkthrough to the signed-in account in a new tab with postMessage (the page never needs or sees a token). When that is not possible it offers the walkthrough as a JSON file to drop on the import page (/import).
The Chrome extension
The same recorder as a Chrome (Manifest V3) extension, Videobana Walkthrough Recorder, free on the Chrome Web Store (https://chromewebstore.google.com/detail/videobana-walkthrough-rec/jjcjfoegekajckjhpdpchehfokomeibd): Add to Chrome, then pin its icon. It works in Chrome, Edge and other Chromium browsers. Its source is the walkthrough-recorder-chrome-extension folder of the Videobana repository; to build it yourself, run npm run extension:build (APP_URL=<origin> sets the Videobana it hands recordings to; the options page changes it later), then Load unpacked at chrome://extensions.
The toolbar icon (or Alt + Shift + W) opens the recorder on the page in front, on any site, with or without the script; Alt + Shift + R starts or stops recording. Both shortcuts can be changed in Chrome, and the icon's menu opens the account's walkthroughs.
Screenshots are taken by Chrome (tabs.captureVisibleTab) with the recorder hidden: no tab to share, Screenshots as I go on by default, and each one is a WebP of at most 1920 px wide.
A guide goes on across the pages of a site: the extension puts the recorder back on each page the author opens on the same site, and the icon shows the number of steps (red while recording). Another site starts a draft of its own. It needs only the activeTab, scripting, storage and contextMenus permissions and sends nothing anywhere but Videobana, when the author saves.
The recorder runs in the extension's own isolated world, so it works under any Content-Security-Policy and loads nothing from elsewhere; the video preview of the page's recorder is left to Videobana, which makes the video from the saved walkthrough.