Skip to content

feat(onboarding): track choose-provider click in auto-deploy flow - #3572

Merged
ygrishajev merged 1 commit into
mainfrom
feat/onboarding-track-choose-provider-click
Aug 7, 2026
Merged

feat(onboarding): track choose-provider click in auto-deploy flow#3572
ygrishajev merged 1 commit into
mainfrom
feat/onboarding-track-choose-provider-click

Conversation

@ygrishajev

@ygrishajev ygrishajev commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added analytics tracking when users choose a deployment provider during onboarding.
    • Events include the onboarding category and selected template for improved reporting.
  • Tests

    • Added coverage to verify provider-selection analytics are recorded correctly.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 83f9c500-54ed-446d-a557-b897378b28f7

📥 Commits

Reviewing files that changed from the base of the PR and between 2ffacdc and 507f2a7.

📒 Files selected for processing (3)
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.tsx
  • apps/deploy-web/src/services/analytics/analytics.service.ts

📝 Walkthrough

Walkthrough

The PR adds provider-selection analytics to AutoDeployFlow, declares the new event, and adds tests for the event payload.

Changes

Provider selection analytics

Layer / File(s) Summary
Analytics event contract
apps/deploy-web/src/services/analytics/analytics.service.ts
The AnalyticsEvent union now includes onboarding_choose_provider_click.
Provider selection tracking
apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.tsx, apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.spec.tsx
AutoDeployFlow tracks provider selection with the onboarding category and template name. Tests provide a mocked analytics service and verify the tracking call.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: stalniy, baktun14

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/onboarding-track-choose-provider-click

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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

Fire an analytics event when a user clicks "Choose my provider" during the auto-deploy
flow, switching from autopilot to manual provider selection. The event sits in the
onboarding funnel next to onboarding_deploy_click and carries the template name so the
drop-off can be segmented per template.
@ygrishajev
ygrishajev force-pushed the feat/onboarding-track-choose-provider-click branch from e2e82b9 to 507f2a7 Compare August 7, 2026 12:07
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.34%. Comparing base (2ffacdc) to head (507f2a7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3572      +/-   ##
==========================================
- Coverage   76.13%   75.34%   -0.80%     
==========================================
  Files        1157     1067      -90     
  Lines       30057    27709    -2348     
  Branches     7440     6986     -454     
==========================================
- Hits        22885    20877    -2008     
+ Misses       6338     6028     -310     
+ Partials      834      804      -30     
Flag Coverage Δ *Carryforward flag
api 88.89% <ø> (ø) Carriedforward from 2ffacdc
deploy-web 66.14% <100.00%> (+<0.01%) ⬆️
log-collector ?
notifications 93.84% <ø> (ø) Carriedforward from 2ffacdc
provider-console 81.38% <ø> (ø) Carriedforward from 2ffacdc
provider-inventory ?
provider-proxy 88.17% <ø> (ø) Carriedforward from 2ffacdc
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...figureDeployment/AutoDeployFlow/AutoDeployFlow.tsx 100.00% <100.00%> (ø)
...oy-web/src/services/analytics/analytics.service.ts 94.61% <ø> (ø)

... and 90 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude claude 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.

LGTM — straightforward analytics instrumentation addition.

Extended reasoning...

Overview

The PR adds a single analyticsService.track("onboarding_choose_provider_click", ...) call inside the existing onChooseProvider handler in AutoDeployFlow.tsx, adds the corresponding literal to the AnalyticsEvent union in analytics.service.ts, and adds a new unit test asserting the tracking call fires with the expected payload. No control flow, business logic, or existing behavior is changed — the new call is purely additive and sits before the pre-existing stopAutopilot() / setBidStrategy("select") calls, which remain untouched.

Security risks

None. This is a client-side analytics event with a static event name and non-sensitive properties (category, templateName, both already used elsewhere in the file/props). No user input is passed to the analytics call beyond the template name, which was already flowing through this component as a prop before this change.

Level of scrutiny

Low. This is a pure instrumentation addition (XS-sized PR) with no impact on the deployment flow logic, no new dependencies, and full unit test coverage of the new behavior (including verifying the exact event name and payload shape). The two candidate issues raised by the bug-hunting system (missing flush-before-navigation, double-click double-firing) are non-issues for a best-effort analytics event — losing or double-counting an occasional click event has no functional impact on the deployment flow, and the existing code has no debounce/flush pattern for the sibling onContactSupport tracking either, so this is consistent with existing conventions.

Other factors

Test coverage for the new behavior is included and follows the repo's setup() pattern with mock<T>(), matching the project's testing conventions. No outstanding review comments need addressing (only an automated CodeRabbit tool-failure notice, unrelated to code correctness).

@ygrishajev
ygrishajev added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit 44bef1f Aug 7, 2026
57 of 58 checks passed
@ygrishajev
ygrishajev deleted the feat/onboarding-track-choose-provider-click branch August 7, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants