Skip to content

feat(onboarding): funnel analytics#7960

Open
talissoncosta wants to merge 4 commits into
mainfrom
feat/onboarding-analytics-7738
Open

feat(onboarding): funnel analytics#7960
talissoncosta wants to merge 4 commits into
mainfrom
feat/onboarding-analytics-7738

Conversation

@talissoncosta

Copy link
Copy Markdown
Contributor
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #7738

Instruments the new single-page onboarding so it sits in one Amplitude funnel, split by variant, alongside the current flow.

  • onboarding_variant user property (control | single_page), set once at identify from the onboarding_quickstart_flow flag. As a user property it splits any funnel by variant with a single "Group by".
  • New flow now emits the milestone events. It auto-creates the project and flag via RTK, which emitted nothing, so the funnel had no project/feature step for the new flow. It now fires First Project created / First Feature created on a real create (org already fired). Milestone events only, not the generic Project/Feature created action events, which stay reserved for resources a user makes by hand.
  • New-flow-only diagnostics for internal drop-off: Onboarding snippet copied (install / wire), Onboarding AI connect used, Onboarding flag toggled.

Activation (first SDK evaluation) is a follow-up, pending #7623's emit shape.

How did you test this code?

Manually, with onboarding_quickstart_flow on and analytics logging enabled:

  1. Sign up, then confirm User register fires and the onboarding_variant = single_page user property is set.
  2. Land on the flow and confirm First Organisation / Project / Feature created each fire once, and not again on revisit.
  3. Copy a snippet, copy the AI prompt, toggle the flag, and confirm the three diagnostics events.
  4. With the flag off (control), confirm the property is onboarding_variant = control.

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jul 15, 2026 3:44pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jul 15, 2026 3:44pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jul 15, 2026 3:44pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds onboarding analytics event definitions and feature-flag-based variant selection. Onboarding panels now report AI prompt copies, while the onboarding flow tracks snippet copies and flag toggles. Bootstrap logic records first-project and first-feature milestones. User identification records the onboarding variant after Flagsmith identification completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added feature New feature or request front-end Issue related to the React Front End Dashboard labels Jul 7, 2026
@talissoncosta talissoncosta force-pushed the feat/onboarding-analytics-7738 branch from 97fe9e6 to 10fa440 Compare July 7, 2026 20:01
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jul 7, 2026
@talissoncosta talissoncosta force-pushed the feat/onboarding-analytics-7738 branch 2 times, most recently from 3a4e76d to 0a430fe Compare July 7, 2026 20:08
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jul 7, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jul 7, 2026
@talissoncosta talissoncosta force-pushed the feat/onboarding-analytics-7738 branch from 0a430fe to 5492b47 Compare July 7, 2026 20:19
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jul 7, 2026
@talissoncosta talissoncosta marked this pull request as ready for review July 8, 2026 11:53
@talissoncosta talissoncosta requested a review from a team as a code owner July 8, 2026 11:53
@talissoncosta talissoncosta requested review from kyle-ssg and removed request for a team July 8, 2026 11:53
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-frontend:pr-7960 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api-test:pr-7960 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7960 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7960 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7960 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7960 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7960 Finished ✅ Results

@github-actions github-actions Bot added the feature New feature or request label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 4 suites
duration  41.8 seconds
commit  5492b47
info  🔄 Run: #18086 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  44.8 seconds
commit  5492b47
info  🔄 Run: #18086 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  46.9 seconds
commit  5492b47
info  🔄 Run: #18086 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  2 failed
passed  1 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 18 seconds
commit  5492b47
info  📦 Artifacts: View test results and HTML report
🔄 Run: #18086 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise
firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

### Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  1 minute, 12 seconds
commit  5492b47
info  🔄 Run: #18086 (attempt 2)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  4.5 seconds
commit  0267ae7
info  🔄 Run: #18090 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 2 suites
duration  10.4 seconds
commit  0267ae7
info  🔄 Run: #18091 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  46.1 seconds
commit  0267ae7
info  🔄 Run: #18090 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  20.2 seconds
commit  0267ae7
info  🔄 Run: #18091 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  7 passed

Details

stats  7 tests across 6 suites
duration  48.2 seconds
commit  0267ae7
info  🔄 Run: #18090 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 5 suites
duration  58.9 seconds
commit  0267ae7
info  🔄 Run: #18090 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 5 suites
duration  19.6 seconds
commit  0267ae7
info  🔄 Run: #18091 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  7 passed

Details

stats  7 tests across 6 suites
duration  49.4 seconds
commit  0267ae7
info  🔄 Run: #18091 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  38.2 seconds
commit  619aeab
info  🔄 Run: #18302 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  5.8 seconds
commit  619aeab
info  🔄 Run: #18302 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  7.4 seconds
commit  619aeab
info  🔄 Run: #18302 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  18.3 seconds
commit  619aeab
info  🔄 Run: #18302 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 3 suites
duration  18.7 seconds
commit  5291318
info  🔄 Run: #18303 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  46.5 seconds
commit  5291318
info  🔄 Run: #18303 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  7 passed

Details

stats  7 tests across 5 suites
duration  23.4 seconds
commit  5291318
info  🔄 Run: #18303 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  57.4 seconds
commit  5291318
info  🔄 Run: #18303 (attempt 1)

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@talissoncosta talissoncosta changed the title feat(onboarding): funnel analytics + variant tagging for the new flow [WIP]: feat(onboarding): funnel analytics + variant tagging for the new flow Jul 8, 2026
@talissoncosta talissoncosta force-pushed the feat/onboarding-analytics-7738 branch from 5492b47 to 0267ae7 Compare July 8, 2026 12:11
@talissoncosta talissoncosta marked this pull request as draft July 8, 2026 12:11
@talissoncosta talissoncosta marked this pull request as ready for review July 8, 2026 12:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 013a9e4c-c310-451f-b31a-9d8a93809700

📥 Commits

Reviewing files that changed from the base of the PR and between 12e69c9 and 0267ae7.

📒 Files selected for processing (7)
  • frontend/common/constants.ts
  • frontend/common/utils/getOnboardingVariant.ts
  • frontend/web/components/pages/onboarding/OnboardingConnectPanel/ConnectWithAiPanel.tsx
  • frontend/web/components/pages/onboarding/OnboardingConnectPanel/OnboardingConnectPanel.tsx
  • frontend/web/components/pages/onboarding/OnboardingFlow/OnboardingFlow.tsx
  • frontend/web/components/pages/onboarding/hooks/bootstrapOnboarding.ts
  • frontend/web/project/api.ts

Comment thread frontend/common/utils/getOnboardingVariant.ts
Comment thread frontend/web/components/pages/onboarding/OnboardingFlow/OnboardingFlow.tsx Outdated
Comment thread frontend/web/project/api.ts
@talissoncosta talissoncosta requested a review from Zaimwa9 July 9, 2026 12:15
@talissoncosta talissoncosta changed the title [WIP]: feat(onboarding): funnel analytics + variant tagging for the new flow feat(onboarding): funnel analytics + variant tagging for the new flow Jul 14, 2026
@talissoncosta talissoncosta changed the title feat(onboarding): funnel analytics + variant tagging for the new flow feat(onboarding): funnel analytics Jul 14, 2026
Base automatically changed from feat/onboarding-next-quest-cards-7739 to main July 15, 2026 15:34
talissoncosta and others added 3 commits July 15, 2026 12:38
The single-page flow auto-creates the project and flag via RTK, which emit no
analytics, so the onboarding funnel had no project/feature step for the new
flow. Emit the milestone events (First Project created, First Feature created)
on a real create - the milestone the user reached - but not the generic
Project/Feature created action events, which stay reserved for resources a user
makes by hand.

Contributes to #7738

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Set an onboarding_variant user property (control | single_page, from the
onboarding_quickstart_flow flag) once, after Flagsmith resolves it at identify.
As a user property it attaches to every event the user emits, so the shared
funnel can be split by variant with a single Group by, without per-event
tagging or touching the shared stores.

Contributes to #7738

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Emit single_page-only diagnostics for the flow's internal drop-off: onboarding
snippet copied (install / wire), AI-connect used, and the in-page flag toggle,
each carrying org / project / environment IDs (no PII). Kept separate from the
control comparison funnel since the control has no equivalent.

Contributes to #7738

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review (CodeRabbit + Kyle): extract the inline 'install' | 'wire' union into a
named OnboardingSnippet type, per the coding guideline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/web/components/pages/onboarding/OnboardingFlow/OnboardingFlow.tsx (1)

169-175: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Record this after a successful toggle. toggleFlag(enabled) is optimistic and reverts on failure, so firing Onboarding flag toggled first will count failed attempts as successes. Move the event behind the mutation success, or rename it to reflect an attempted toggle.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 201b985b-f190-4485-accb-a5fc84a0324f

📥 Commits

Reviewing files that changed from the base of the PR and between 619aeab and 5291318.

📒 Files selected for processing (1)
  • frontend/web/components/pages/onboarding/OnboardingFlow/OnboardingFlow.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onboarding: funnel analytics + variant tagging for the new flow

3 participants