Telemetry: Disambiguate traffic coming from error/upgrade links#32287
Conversation
|
View your CI Pipeline Execution ↗ for commit 6aa17df
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: No significant changes detected, all good. 👏 |
cd46fac to
239f97e
Compare
jonniebigodes
left a comment
There was a problem hiding this comment.
@shilman this is shaping up nicely, I left some items for you to consider when you can. The major one i'm concerned is the URL structure usage.
Approving to unblock you.
| category: Category.CLI_AUTOMIGRATE, | ||
| code: 1, | ||
| documentation: 'https://storybook.js.org/docs/configure/overview#es-modules', | ||
| documentation: 'https://storybook.js.org/docs/configure/overview?ref=error#es-modules', |
There was a problem hiding this comment.
@shilman just a heads up, this will point to an incorrect URL as we don't have actual documentation about it except the following entry in the monorepo's migration guide and in the main.js|ts API reference
There was a problem hiding this comment.
@jonniebigodes Thanks for your diligence on this. I think we should add a section on ESM only to the configuration overview page as part of SB10 release, so I'm going to leave this as is for now. But if we want to keep the existing structure we can link to the main.ts|js reference instead. I'll let you guys take care of that separately cc @kylegach
Telemetry: Add ref=error/upgrade/ui to links (cherry picked from commit 14cf3d9)
Telemetry: Add ref=error/upgrade/ui to links (cherry picked from commit 14cf3d9)
Telemetry: Add ref=error/upgrade/ui to links (cherry picked from commit 14cf3d9)
Closes N/A
Telescopes on #32286
What I did
Better disambiguate traffic coming from error/upgrade links
🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>Greptile Summary
This PR adds UTM tracking parameters to Storybook documentation links throughout the codebase to improve telemetry and traffic attribution. The changes systematically add
?ref=errorparameters to links that appear in error messages and?ref=upgradeparameters to links that appear in upgrade/migration contexts, while also adding?utm_source=uito links accessed from UI components.The implementation spans 28 files across the Storybook codebase, touching error handling systems, CLI tools, UI components, and documentation blocks. Key areas affected include:
StorybookErrorclass and various specific error classes now append?ref=errorto all storybook.js.org URLs in error messages?ref=upgradeparameters?utm_source=uiparametersThis telemetry enhancement builds on PR #32286 and enables the Storybook team to distinguish between different traffic sources (error-driven, upgrade-driven, and UI-driven) when users navigate to documentation. The changes are purely additive and cosmetic, maintaining all existing functionality while providing valuable analytics data.
Confidence score: 4/5
code/core/src/storybook-error.tsfor potential URL construction issues with nested ternary operators