Repository navigation
feat(analytics): report the two conversion CTAs that live in shared-uis - #84
Merged
Merged
Conversation
Both sit on the monetisation intent ladder and reported nothing: - GlobalErrorFallback's Contact Support. Fired with intent "error", not "upgrade", so a crash-driven support reach-out is countable in the same place as the rest without inflating conversion intent. - ProfileModal's "Upgrade now". shared-uis cannot reach the host app's goToBilling() helper, so it fires upgrade_cta_clicked directly; the UpgradeSource union is what keeps the two in step rather than convention. Depends on idivarts/shared-constants#11 for both event types. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Oct 28, 2026
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.
Part 3 of 5. Depends on idivarts/shared-constants#11 for both event types — merge that first.
What
Two CTAs in this submodule sit on the monetisation intent ladder and reported nothing:
components/GlobalErrorFallback.tsxsupport_contact_clicked { channel: "email", intent: "error" }components/ProfileModal/Profile-Modal.tsxupgrade_cta_clicked { source: "profile_modal" }Two decisions
The crash CTA uses
intent: "error", not"upgrade". It belongs on the same event so every support reach-out is countable in one place, and on a distinct intent so it can never inflate the conversion funnel. That is the whole reasonintentexists as a field rather than being assumed from the source.ProfileModal fires
upgrade_cta_clickeddirectly rather than going through thegoToBilling()helper that every CTA intrendly-brandsnow uses —shared-uiscannot import from the host app. The typedUpgradeSourceunion is what keeps the two in step; a new source is a compile error on both sides rather than a convention someone has to remember.Note for
trendly-userstrack()is a no-op until a sink is registered, so this is inert in any host that has not wired analytics. But this is the first analytics call inshared-uis, so bumping its pointer intrendly-userswill requireshared-constantsto be bumped there too, or the typecheck will fail on the unknown event names.🤖 Generated with Claude Code