docs: process user input from flows (all 7 SDK platforms) - #522
Draft
eandreeva-twr wants to merge 1 commit into
Draft
docs: process user input from flows (all 7 SDK platforms)#522eandreeva-twr wants to merge 1 commit into
eandreeva-twr wants to merge 1 commit into
Conversation
Flows now report the values users type and select to the app through the SDK's analytics callback, as the `flow_user_input` event. Screen views reach the same callback as `flow_screen_showed`. Add "Process data from flows" for all seven SDK platforms, covering how to register the callback, decode the JSON-string payload, and what each element type puts in `value`. Three shared reusables carry the parts that are identical across platforms: the value-shape table, the delivery limitations, and the screen-view parameters. Correct the "Analytics events" sections in the handling-events articles, which stated that flows don't emit these events, and the same claim in the Flutter, KMP, and Unity v4 migration guides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flows report the values users type and select to the app through the SDK's analytics callback, as a
flow_user_inputevent. Screen views reach the same callback asflow_screen_showed. Neither was documented, and the docs actively said the opposite.New articles
"Process data from flows" for iOS, Android, Flutter, React Native, Unity, Kotlin Multiplatform, and Capacitor — added to each Flows & paywalls sidebar right after "Handle events", mirroring where "Process data from onboardings" sits.
Each covers registering the callback, decoding the payload, the value shape per element type, delivery limitations, and three use cases: registering users on your own backend, enriching the Adapty profile, and segmenting which flow a user sees later.
Corrections
Every
*-handling-events.mdxsaid "Flows don't emit these to your code yet, so you don't need to implement it." That is no longer true. Each now has a real Analytics events section documentingflow_screen_showedand linking to the new article. The Flutter, KMP, and Unity v4 migration guides repeated the same claim and are fixed too.On Android,
onAnalyticEventmoved out of the "Reserved events" table, which now lists onlyonShowAppRateandonShowRequestPermission.Shared reusables
Three snippets hold what is identical across platforms, so the contract has one home rather than seven: the element-type/value table, the delivery limitations, and the
flow_screen_showedparameters. The payload is versioned (version: 1), so a v2 is expected.Per-platform differences worth review
These are the places a copy-paste sweep would have got wrong:
payloadis a JSON string nested inside one. Both steps are shown.updateProfile({ params: … })— where React Native passes the object directly.setCustomStringAttribute(value, key)vsSetCustomStringAttribute(key, value).Every API name and signature was verified against the SDK source, not inferred.
Why this is a draft
The backend transformer change that emits these events is not merged yet, and product/privacy approval for sending raw text, email, and phone values to client code with no opt-out is still open. If that review adds an opt-out or trims which fields are sent, the "you don't set anything up in the builder" framing in all seven intros needs reworking. Please don't merge before the transformer ships.
Two things the docs say that reviewers should sanity-check:
element_idis not unique across screens; the key isinstanceId+element_id.Verification
check-mdx-parseclean across 5,947 files,lint-mdxOK,check-links --diff0 broken over 286 links. All 17 affected pages confirmed rendering locally.