Skip to content

feat(devtools): tag outbound CTA links with UTM params - #1083

Merged
zahlekhan merged 2 commits into
mainfrom
devin/1787739869-devtools-cta-utm
Aug 26, 2026
Merged

feat(devtools): tag outbound CTA links with UTM params#1083
zahlekhan merged 2 commits into
mainfrom
devin/1787739869-devtools-cta-utm

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What

Devtools CTAs (Purchase Credits, Add your own key, reliability banner Learn more) pointed at bare URLs, so clicks from the devtools panel were indistinguishable from other referrals. This tags them, mirroring the docs-site helper (docs/lib/thesys-link-attribution.ts).

Changes

  • New withDevtoolsAttribution(href, content) in packages/devtools/src/lib/links.ts: sets utm_source=openui, utm_medium=referral, utm_campaign=openui_devtools, plus a per-CTA utm_content; never overwrites params already on the URL and returns the input unchanged if it doesn't parse.
  • QuotaErrorRow billing/BYOK buttons use it (utm_content=quota_error_purchase_credits / quota_error_byok).
  • ReliabilityBanner link uses it (utm_content=reliability_banner_learn_more).
  • Bumped @openuidev/devtools to 0.1.1 so this can ship via the "Publish NPM packages" workflow. Apps auto-mounting through react-lang pin jsDelivr @0, so they pick it up with no consumer change.

Test Plan

  • Verified locally

pnpm --filter @openuidev/devtools lint:check, format:check, and test (30 passed). typecheck fails on src/OpenUIDevtoolsWidget.tsx(364,30): Cannot find name 'DevtoolsPosition' — reproduced on main with these changes stashed, so it is preexisting and untouched here.

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility

Link to Devin session: https://app.devin.ai/sessions/e3f8abfb369d491ebb4d64db43e17f51
Requested by: @zahlekhan

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
openui-docs Ready Ready Preview Aug 26, 2026 11:03am

Request Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@zahlekhan
zahlekhan merged commit 48bbd7c into main Aug 26, 2026
4 checks passed
@zahlekhan
zahlekhan deleted the devin/1787739869-devtools-cta-utm branch August 26, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants