feat(cli): add marketplace funnel telemetry to integration add command#15065
feat(cli): add marketplace funnel telemetry to integration add command#15065
Conversation
🦋 Changeset detectedLatest commit: 87e2258 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-pwrsgeeud.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-pwrsgeeud.vercel.sh/tarballs/vercel.tgz"
}
}
}Python Runtime WheelA Python runtime wheel was also built for this PR. |
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 1 (3%)
Unaffected packages - 39 (98%)
Results
This comment is automatically generated based on the affected testing strategy |
c204192 to
365ca23
Compare
365ca23 to
4517fd9
Compare
4517fd9 to
3835c84
Compare
3835c84 to
46a9736
Compare
46a9736 to
3e2b36a
Compare
3e2b36a to
690222b
Compare
690222b to
85d3b27
Compare
85d3b27 to
61a9a6a
Compare
61a9a6a to
3608dca
Compare
3608dca to
a209dc6
Compare
a209dc6 to
22007f8
Compare
22007f8 to
710965c
Compare
710965c to
b71d69c
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b71d69c to
87e2258
Compare

Summary
Adds marketplace funnel telemetry events to the auto-provision path of
vercel integration add(FF_AUTO_PROVISION_INSTALL=1). The legacy path is not instrumented — it will be removed.Events tracked (9):
marketplace_install_flow_startedmarketplace_checkout_plan_selected— includesplan_selection_method(cli_flag / server_default)marketplace_checkout_provisioning_startedmarketplace_checkout_provisioning_completed— includesresource_idmarketplace_checkout_provisioning_failed— includeserror_messagemarketplace_project_connected— includesproject_id,resource_idmarketplace_project_connect_failed— includesproject_id,resource_id,error_messagemarketplace_install_flow_web_fallback— reason passed through from server responsemarketplace_install_flow_dropped— input validation failures after funnel entry (metadata_parse_error, metadata_validation_failed, resource_name_invalid)All events carry base props:
integration_id,integration_slug,integration_name,product_id,product_slug,team_id,source: "cli",is_auto_provision: trueWeb fallback events include pass-through fields from the auto-provision API response:
auto_provision_result_kind,auto_provision_result_reason,auto_provision_error_message. No client-side interpretation — server values forwarded as-is.Implementation
trackMarketplaceEvent(event, props)— no per-event interfaces or typed wrappersAutoProvisionFallback.kindand.reasontyped asstringfor forward-compatibility with new API responsesonProjectConnectedcallback added toPostProvisionOptionsto decouple telemetry from post-provision setupfallback.reason ?? fallback.kind— pure pass-through from serverflow_startedexit has a terminal event — no silent funnel dropsFallback guard fix
isAutoProvisionFallbackchanged from allowlist (['metadata', 'unknown'].includes(kind)) to denylist (kind !== 'provisioned'). This is a behavioral change beyond telemetry:kind: 'install'(returned when policies not accepted) — would have thrown an unhandled error instead of falling back to the browserkindvalues (e.g.multiple_installationsfrom https://github.com/vercel/api/pull/61258) are automatically handled as browser fallbacksurl,integration,productfields present + HTTP 422) are the real guard, ensuring only actual step responses are caughtThe API currently returns 4
kindvalues:provisioned(201 success),install,metadata,unknown(all 422 fallbacks). The denylist ensures the CLI doesn't need updating each time the API adds a new fallback reason.Event Lifecycle
Happy Path
Unhappy Paths
Terminal Events by Exit Type
flow_droppedpolicy_declinedflow_droppedmetadata_parse_errorflow_droppedmetadata_validation_failedflow_droppedresource_name_invalidweb_fallbackkind/reasonprovisioning_failedDependency
reasonfield to auto-provision responses) — merged and deployedkindvalue as the telemetry reasonreasonfor full funnel specificityTest plan
Fixes: MKT-2615
🤖 Generated with Claude Code
Note
Low Risk Change
This PR adds telemetry instrumentation to a CLI command with one behavioral change: the fallback guard logic changed from an allowlist to a denylist, which is a bug fix that handles additional API response kinds as browser fallbacks rather than throwing errors.
isAutoProvisionFallbacknow uses denylist (kind !== 'provisioned') instead of allowlistonProjectConnectedandonProjectConnectFailedtoPostProvisionOptionsRisk assessment for commit 87e2258.