Onboarding and cancel flow
What you build in MRRocket's Onboarding and Cancel flow shows up inside your product through the tracking code, without a deploy: onboarding tours, checklists and modals, the cancel flow, and the in-app messages of your Emails journeys. They need tracking code 0.7.0 or later; tour steps that point at any element need 0.11.0; a bubble's side, pictures and videos, page triggers and tours started from a checklist need 0.17.0.
In MRRocket each onboarding item's form says whether your product's tracking code can show it. An onboarding step that needs a change in your code (a marked element, an event) has Copy for AI agent: one prompt for Claude Code, Cursor or Codex to make the change.
Onboarding#
A live tour, checklist or modal starts on its own when the person does its trigger: an event your app records (track("Signed up")), "First launch" / "First visit", or (0.17.0) a page of your app ("/settings", "/projects/*", also after client-side navigation). Each person sees it once; when one ends, the next one of the same moment follows. Progress is kept by MRRocket for people you identify(), so it follows them across devices; a visitor without an id needs consent="cookies". An item set to "Signed-in people only" (0.17.0) waits for identify().
| Item | What the person sees |
|---|---|
| Tour | Bubbles pointing at elements of your app, one after another. Without a target a step shows as a card. Since 0.17.0 a bubble sits on its chosen side (Top, Bottom, Left, Right, or Auto: below, above when there is no room) and can show a picture or a video. |
| Checklist | A short to-do list in the corner. A task ticks itself when your app tracks its event; without one, the person ticks it. Since 0.17.0 a task can start one of your tours; finishing the tour ticks it. |
| Modal | A window in the middle of the screen, since 0.17.0 with a picture or video and a button that can go to a page. |
Videos are YouTube, Vimeo or Loom links, played in their players without tracking cookies, or a video file (mp4). Older tracking codes show items without the 0.17.0 parts. Emails of older onboarding flows are sent by MRRocket itself, from the product's verified domain; new emails are made in Journeys.
Point a tour step at an element#
In the tour step, Pick on your site opens your site in a frame: point at the element and click it, and MRRocket stores a CSS selector for it (#new-project, .toolbar > button:nth-of-type(2)). Nothing is tracked in that frame, and a normal visit never sees the picker. Or mark the element yourself and use its name as the target:
<button data-ck-target="new-project">New project</button>Start a flow yourself#
const { startOnboarding } = useCockpit();
startOnboarding(); // the first live item (not one that only a checklist starts)
startOnboarding("flow_id"); // one item<CockpitProvider onboarding={false}> (script tag: data-onboarding="false") turns the automatic start off; then only your call starts a flow.
Cancel flow#
Open it from your Cancel button. Business customers get the survey ("Why are you leaving?") and the offer for their answer (a discount, a pause, a downgrade, or talk to us); anyone else gets the plain confirmation, so a consumer can always cancel in one step (§ 312k BGB). Without a live flow it is the plain confirmation, so the button always works.
"use client";
import { useCancelFlow } from "@mrrocket/sdk/next";
const cancelFlow = useCancelFlow();
const result = await cancelFlow.open({
customer: "business", // otherwise only the confirmation
price: { amount: 29, currency: "EUR", interval: "month" },
onSave: (r) => applyOffer(r.offer), // your code: coupon, pause, plan change
onCancel: () => cancelSubscription(), // your code
});
// result.outcome: "cancelled" | "saved" | "kept"MRRocket never changes a subscription from the flow: your onSave and onCancel do, and only after they succeed is the outcome recorded. Throwing keeps the dialog open with an error. Saves and cancellations then show in Cancellations.
In-app messages#
A journey step of the kind In-app message shows to the signed-in person as a banner or a dialog, and the journey moves them on when they click or close it.
Script tag and React Native#
- Script tag:
mrrocket.cancelFlow.open({ … })andmrrocket.onboarding.start(). The dialogs load as their own file (sdk-flows.js) only when something shows. - React Native and Expo:
MRRocketProviderdraws the flows (flows={false}to opt out);useCancelFlow()anduseOnboarding()work the same way.
Look#
<CockpitProvider appearance={{ theme: "dark", accent: "#0f766e" }}> (script tag: data-theme, data-accent), or CSS variables on .ckf-root in your own stylesheet: --ckf-accent, --ckf-bg, --ckf-fg, --ckf-muted, --ckf-line, --ckf-radius, --ckf-font.
What is recorded#
Under the person's analytics consent: $onboarding (started, shown, completed, dismissed; a tour started from a checklist says which), $cancel_flow (shown, answered, offer, finished with its outcome) and $inapp (shown, clicked, dismissed).