Skip to content

feat(devtools): split outbound UTM campaign into oss and cloud - #1134

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1788857376-devtools-utm-oss-cloud
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1788857376-devtools-utm-oss-cloud

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What

Devtools tagged every outbound CTA with one campaign (openui_devtools), so referrals from OSS-only apps and from OpenUI Cloud apps were indistinguishable. The campaign is now openui_devtools_oss / openui_devtools_cloud.

The surface is detected at runtime with no new dependency: @openuidev/observability-cloud registers its client on globalThis[Symbol.for("openui.cloudObservability")], which is visible cross-bundle, so a live client there means the app is on Cloud. Call sites that are inherently Cloud (the quota/billing CTAs) pass "cloud" explicitly.

withDevtoolsAttribution(href, content)            // oss | cloud, auto-detected
withDevtoolsAttribution(href, content, "cloud")   // forced

Changes

  • packages/devtools/src/lib/links.ts: DevtoolsSurface, detectDevtoolsSurface(), third surface arg on withDevtoolsAttribution, per-surface utm_campaign
  • Quota billing/BYOK CTAs pass "cloud"
  • Tests for detection, explicit surface, existing-param preservation
  • Comment on GLOBAL_KEY in observability-cloud noting devtools reads it

Test Plan

  • Verified locally

pnpm --filter @openuidev/devtools test lint:check typecheck format:check pass. @openuidev/observability-cloud has a preexisting failure on main (SDK_VERSION 0.0.1 vs package.json 0.0.2), unrelated to this change.

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility — surface is optional, so existing calls keep working; the campaign value changes, which analytics dashboards filtering on openui_devtools will need to account for

Link to Devin session: https://app.devin.ai/sessions/1e7e97b38afb400389badd2a24a786bd
Open in Devin Desktop: https://app.devin.ai/desktop/session/1e7e97b38afb400389badd2a24a786bd?variant=devin
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 Sep 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openui-docs Ready Ready Preview Sep 8, 2026 8:52am UTC

Request Review

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.

1 participant