Lesson notes
How it works
How the first-login tour decides when to run
MemberScript #151 uses Intro.js, an open source tour library, to draw the highlight and tooltips. Intro.js is free under the AGPL licence and sells a commercial licence, so check which one your site needs. The script itself decides when the tour runs and which elements it visits.
When the page loads, the script waits for Memberstack, then checks that someone is logged in. If nobody is, it stops, so visitors never see the tour. Next it looks in the browser's local storage for a key called ms-code-tour-shown. If the key is there, the tour has already run and the script stops. If not, it collects every element with ms-code-step, sorts them by their number, starts the tour with each element's ms-code-intro text, and saves the key so the tour won't run again.
That key lives in the browser, not on the member. A member who logs in on a new device or browser will see the tour once more there.
Set up the tour in Webflow
- Add the Intro.js library (its stylesheet and script tags) to your head code. There's nothing to edit in it.
- Paste MemberScript #151 into the page where the tour should run, usually your dashboard.
- Optionally mark the wrapper that holds your steps with
ms-code-tour="true", as the video does. - Give each element you want to highlight
ms-code-stepwith its order, likems-code-step="1",ms-code-step="2". - Give each of those elements
ms-code-introwith the tip text, likems-code-intro="This is your control panel.". - Publish and log in as a test member in a fresh private window to see it.
Style the tooltips
The video adds a code embed on the page with CSS for the tooltip. It has sections for the tooltip container and for the Next and Previous buttons, so you change background, text and button colours there. If you're happy with the default look, leave it as is. Keep each tip short: one sentence on what the element does and why the member should care.