Guide authoring, targeting, and publishing
Guide kinds
flow (multi-step tour), modal, tooltip, banner, announcement, checklist, survey. All kinds share the same editor shell, targeting, triggers, frequency controls, publishing pipeline and analytics.
Step types
modal, tooltip, popover, spotlight (overlay with a cut-out), hotspot (pulsing dot that opens a tooltip), banner, slideout, custom (sanitized HTML, no chrome). Every step has title, rich-text body, image, buttons (next, back, dismiss, complete, skip, url, start_guide, event, open_resource_center), placement/offset/width, overlay, progress, close button, auto-advance (button, element_click, element_visible, event, delay), optional URL for multi-page flows, branches (rule → jump to step), and step-level targeting.
Platforms
Each guide lists the platforms that receive it (Trigger → Platforms): Web, iOS and Android (React Native apps count as iOS or Android). Guides created before mobile support are web-only. In mobile apps, URL patterns, URL triggers, multi-page steps and URL-visited tasks match the screen path /<ScreenName> reported by the app. See mobile.md.
Targets and selectors
A target is an ordered list of strategies: guidely-id (the cross-platform id: data-guidely-id on the web, GuidelyTarget / guidelyTarget() in mobile apps), id, data-attr (data-testid, data-tour, …), aria, css, text, xpath. Mobile apps resolve guidely-id and id strategies (and CSS selectors naming a single id). The runtime uses the first strategy resolving to exactly one visible element, waits up to waitMs (MutationObserver + polling) and then applies fallback: skip the step, show_as_modal, end_guide, or wait. Prefer stable attributes (data-tour="primary-action") over generated class names; the editor warns when a selector looks fragile or matched text has changed since it was picked.
Web components and Shadow DOM (Salesforce Lightning Web Components, Lit, Shoelace, Ionic, …): strategies also search inside open shadow roots, after the document itself, so an existing target keeps resolving to the same element. A CSS value can step into a host's shadow tree with >>>: c-account-list >>> [data-tour='new'] is that element anywhere inside c-account-list's shadow tree (nested ones too). The picker writes these chains when a selector is only unique inside its own component. When you pick a control that is wrapped by a small component (a design-system button around its <button>, an input component around its label and field), the picker targets the component, not its internals, which the design system can change in any release. Closed shadow roots and XPath cannot cross shadow boundaries; SDKs older than this release skip >>> strategies and fall through to the next one.
Picking elements in your app ("Preview in app")
- Open a guide in the editor and click Pick element on a step (or Preview in app).
- Enter your application's URL and environment. Guidely creates a short-lived authoring session and opens the app in a new window with
?guidely_authoring=<token>. - The installed SDK verifies the token with the public API, enters authoring mode (toolbar + hover outlines), and sends each click back to the editor (
postMessageto the dashboard origin, plus the authoring-session API as a fallback). - The editor fills in the selectors and text snapshot; Preview in app renders the current draft step or the whole draft guide in your app without publishing.
This works cross-origin and with authenticated apps because the SDK runs inside your page; nothing is loaded in an iframe. Requirements: the SDK must be installed with the same environment key, the dashboard origin must be reachable from the browser, and pop-ups must be allowed for the dashboard. Without the SDK installed, use the built-in simulated preview and manual selectors.
Who can see this
Every guide, checklist, survey, banner and announcement has a Who can see this setting at the top of its Targeting panel: Everyone (the default), Logged-in users (only after your app calls identify() with a user id) or Anonymous visitors (not identified yet, e.g. before sign-in; reset() on logout makes the visitor anonymous again). It applies on top of the targeting rules. The server sends it to SDKs as a user.identified rule ANDed with the guide's rules, so every SDK applies it; SDKs that predate that rule show a logged-in-only or anonymous-only guide to nobody.
Targeting rules
Rules are AND/OR trees with negation. Fields: user/account attributes (as passed to identify), role, plan, logged in (identified), URL path/full/query, device type/browser/OS, first visit/returning, custom events seen in the session, guide completed/dismissed/seen, checklist completed, audience membership, date/time, percentage rollout (deterministic per user), environment, locale. Operators: equals, not equals, contains, does not contain, starts/ends with, exists, gt/gte/lt/lte, in/not in, regex (≤200 chars, invalid patterns never match), before/after, is true/false.
Where rules run: URL, device, attribute, event, time and rollout rules run in the SDK. Audience membership, guide history and checklist completion come from the server at identify() time; the browser only receives the resulting IDs, never audience definitions.
Triggers and frequency
Triggers: page load, URL match, custom event, element click, element visible, manual (startGuide), delay, after another guide completes, when a user enters a segment. Frequency: once per user, once per session, every time, repeat every N hours, maximum impressions, cooldown after dismissal, priority (lower wins), mutual exclusion lists, re-show after dismissal. Only one flow/modal/tooltip guide is active at a time; banners, checklists, hotspots and the resource center may coexist. Remaining eligible guides are queued and shown when the active one ends.
Guide throttling
Settings → Guides → Guide throttling limits how many guides launch on their own per visitor: at most N automatic guides per H hours, and/or a minimum gap of M minutes between two. Only automatic launches of interrupting guides count and are held back: flows, modals, tooltips, announcements and surveys started by their trigger. Banners, checklists, hotspot-only guides and guides started by the visitor or your app (startGuide(), buttons, Help, "Show me") are never throttled. Tick Ignore throttling on a guide (Frequency) for must-see messages. Every SDK keeps the visitor's recent launches on the device (survives identify; reset() clears it).
Scheduling
- Display window (guide → Schedule & review): a start and/or end date and time, entered in a time zone, stored as UTC instants in the guide's config (
schedule: { startAt, endAt, timezone }). Works for every guide kind and on every SDK: outside the window the guide is ineligible. It is part of the draft, so it goes live when you publish. - Scheduled publish / unpublish: queue "publish the draft to production on Monday 09:00 Europe/London" (or unpublish). The worker's
guides.schedulesjob runs due changes every minute, as the teammate who scheduled them with their permissions at that moment — a production publish in a workspace that requires reviews still needs an approved review then. Failed runs keep the reason. Pending changes show as badges in the guide list and can be cancelled.
Translations
Set the project's default language and translation languages in Settings → Guides. Each guide's Translations tab lists every text (step titles, bodies, buttons, image descriptions, custom HTML, checklist and survey texts) by a stable key such as steps.<stepId>.title, side by side with its translation, with missing translations marked and a coverage count per language.
- Translate missing fills gaps with the project's Anthropic key (Scout settings, or the server's
ANTHROPIC_API_KEY;GUIDELY_MOCK_TRANSLATION=1fakes it locally), and redoes machine translations whose source text has changed. Translations a teammate wrote are never overwritten. - Export / Import one language as XLIFF 1.2 (for translation tools) or CSV (
key, context, source, <locale>). Imports ignore keys that no longer exist. - Translations are saved in the draft and go live with the next publish. Untranslated texts show in the default language.
- Which language a visitor sees: the SDK's
localeoption /setLocale(), else the user'slanguageorlocaletrait, else the browser's (device's) languages — matched exactly, then by base language (fr-CA→fr), else the default language. Guide events carryproperties.locale, so analytics break down by language. - The resource center has its own Translations tab: its title, launcher, collections, links, FAQs, article titles, summaries and bodies, and "What's new" entries. They go live when you publish the resource center (articles in a language are also served by
GET /sdk/articles/:id?locale=). - Review. Every translation remembers who wrote it: machine translations show AI · needs review until a teammate clicks Approve (or Approve all); texts a teammate types or imports count as reviewed by them. When the source text changes after a translation was written or approved, it shows Source changed until someone approves it again (or it is retranslated). The To review filter lists what is waiting. State lives in
TranslationReview; translations from before review existed count as reviewed. - Approve machine translations before they go live (Settings → Guides): visitors get a machine translation only once it is approved; until then that text shows in the default language. Applies to guide publishes, the resource center snapshot,
GET /sdk/articles/:id?locale=and "What's new". - Translate automatically with AI (Settings → Guides): the worker (
translations.auto, every 2 minutes) machine-translates guides and the resource center into every project language a minute after they were last edited. Turning it on, or saving the languages with it on, queues every guide. Publishing also translates first when review isn't required (and the publish isn't to production under a production review). A guide whose production review is pending or approved for the current draft is skipped, so translation never voids a review. New translations reach visitors at the next publish. - Translations page (sidebar → Translations): progress per language for every guide and the resource center, and how many translations wait for review, linking into each editor.
- The guide editor's autosave leaves
localizationout of the config it sends, and the server keeps the stored translations; translation saves write onlydraftConfig.localization, under a row lock.
A/B tests
Test a guide against a variant, several variants, or against no guide (a control group), on a goal: completes the guide, tracks an event, visits a page (/billing/*) or clicks an element with text. Create one from a guide's A/B test tab: the guide is variant A, copies become B, C… (edit them like any guide), traffic splits evenly (adjust the whole-number weights; they add up to 100).
- Assignment is sticky and deterministic: each visitor's bucket 0–99 is FNV-1a of
userId || anonymousIdsalted withgx:<test id>; variants own consecutive ranges. The server folds each variant's range into its guide's targeting as twoexperiment.bucketrules, so every SDK applies the split with the rule engine it already has and always agrees with the server. - Starting publishes the variant guides to the test's environment (production by default; the usual permissions and reviews apply) and starts splitting traffic. While running, a guide variant's exposure is recorded when it shows (
experiment_viewedwithguideExperimentIdandvariantId). The control group is served to every SDK (web, React Native, iOS, Android) as a holdout: evaluated with the base guide's targeting, trigger and frequency, never rendered, and its exposure recorded when the guide would have shown. SDKs older than 0.11.0 record no exposures for tested guides, so results only count visitors on current SDKs. - Results use the same statistics as feature-flag experiments: conversion rate per variant, uplift against the control (or the first variant) with a 95% interval, chance to win, and a sample-ratio check. Visitors exposed to more than one variant are left out.
- Declare a winner: the winning guide keeps running for everyone (its bucket rules drop out) and the other variant guides are unpublished from that environment; a winning control unpublishes them all.
Production reviews
Turn on Require review before publishing to production (Settings → Guides, admins). Then a guide can only be published to production once someone who may publish to production — not the requester — has approved its current draft (name + configuration). Request a review from Schedule & review, pick reviewers, discuss in the thread, and the reviewer approves or requests changes with a comment. Any edit after approval needs a new review. Development and staging, pausing, rollback and unpublishing are not gated. Requests, decisions and comments are in the audit log. This adds to the existing production gate: editors still need Publish to production (or the project's "editors can publish to production" setting).
Custom CSS and code blocks
- Custom CSS (guide Appearance, and Settings → Branding for every guide): rules are sanitized (
@import,:host, non-httpsurl()s, script hooks and markup are removed) and every selector is prefixed with the guide's own container inside the SDK's Shadow DOM, so it can't reach your page, other guides, the resource center or the messenger. Web only. - Code blocks run your JavaScript when a custom step shows (
guidely.next(),back(),complete(),dismiss(),container; return a function to clean up). They are off by default and only a workspace admin can allow them (Settings → Guides), because once allowed anyone who can edit guides can run code on your site for every visitor. The server never serves code blocks while they are off, never to mobile SDKs, and dashboard previews never run them. A Content Security Policy withoutunsafe-evalblocks them. Web only.
Accessibility
Guides follow WCAG 2.1 AA: dialogs are labelled and trap focus, Escape closes, → / ← move between steps, focus returns where the visitor was, hotspots are buttons with state, the progress is announced, images take a description (empty = decorative), button labels on your primary colour automatically use white or dark text for contrast, and animations stop with reduced motion. The editor warns when your colours fall below AA contrast.
Publishing
- Draft changes autosave and are never shown to end users.
- Validate before publishing; errors (missing targets, empty checklists, invalid URLs) block.
- Publish snapshots the draft into an immutable version and points the chosen environment at it. Publishing the same draft to several environments reuses the version.
- Pause / Resume / Unpublish per environment; Roll back to any earlier version; Restore to draft copies a version back into the draft.
- Every publish, rollback, pause and unpublish is recorded in the guide history and the workspace audit log, and bumps the environment's
configVersionso SDK caches refresh (ETag). SDKs that are offline keep the last good configuration until they can refresh. - Permissions: editors publish to development/staging; production needs an admin unless the project allows editors (Settings → Privacy & data).