Build an onboarding flow
Create linked screens with questions, show them to new visitors and receive every answer in your code.
In Screens select New screen, choose the Onboarding Flow template, name the flow and select Create 3 screens. It makes three linked screens named like My flow · Goal, · Schedule and · Ready: a goal question (field goal), days (field days, up to 3) and an optional email (field email).
To build your own, add questions from the palette (Single choice, Multiple choice, Text field). Set the Field ID and each Answer ID, and turn on Must answer to continue if needed. For the buttons choose the action Go to another screen and pick the next screen, or Back to previous screen. The last button uses Run your code with an Action ID such as finish_onboarding. See Flows and questions.
Publish every screen. A linked screen that is not published fails to open.
In Placements add a placement, for example onboarding, and set Shows to the first screen. On its Screen & display tab choose Full screen or Popup.
Show it from your code:
const result = await UIKit.presentPaywall({
paywall: { placement: 'onboarding' },
onAnswer: ({ fieldId, value }) => console.log(fieldId, value),
onAction: ({ actionId, answers }) => {
if (actionId === 'finish_onboarding') saveProfile(answers);
// answers: { goal: 'strength', days: ['mon', 'wed'], email: 'a@b.com' }
},
});Check Analytics: By screen shows how many people reached each step and Answers counts each choice. Typed email is never sent to Miniwall.