From 1a6bafdc2fc62458634d3694905e8f3ff92e16b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 4 Nov 2026 15:47:11 +0000 Subject: [PATCH] feat(site): tag cloud sign-up links with src=site CLOUD_SIGNUP_URL now opens https://cloud.objectos.ai/_console/register?src=site, so cloud records sign-ups started from this site as signed_up.source = site instead of direct. The header CTA, the drawer CTA, the home hero, the pricing page's Free and Team buttons and llms.txt all read the constant already. signupUrl(src) builds the link and clamps src to cloud's closed list (site, docs, hn, blog, cn_demo, direct, other); any other value becomes other. The sign-in link is unchanged. Co-Authored-By: Claude --- src/lib/positioning.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib/positioning.ts b/src/lib/positioning.ts index 254368c..a9d3c9d 100644 --- a/src/lib/positioning.ts +++ b/src/lib/positioning.ts @@ -67,8 +67,22 @@ export const OBJECTSTACK_URL = 'https://objectstack.ai'; * page's Free and Team buttons and the footer all link these two constants, * so the hosted product is named in one place. `cloud.objectos.ai/` itself * redirects to this site, so the links name the console's own pages. + * + * The sign-up link carries `src`, which cloud reads from the register page's + * Referer and records as `signed_up.source`. Cloud clamps it to a closed list, + * mirrored by `SIGNUP_SOURCES`; any other value is sent as `other`. The link + * must open `/_console/register` itself: a detour through another console page + * drops the query from the Referer and the sign-up records as `direct`. The + * sign-in link carries no source. */ -export const CLOUD_SIGNUP_URL = 'https://cloud.objectos.ai/_console/register'; +export const SIGNUP_SOURCES = ['site', 'docs', 'hn', 'blog', 'cn_demo', 'direct', 'other'] as const; + +export function signupUrl(src: string): string { + const source = (SIGNUP_SOURCES as readonly string[]).includes(src) ? src : 'other'; + return `https://cloud.objectos.ai/_console/register?src=${source}`; +} + +export const CLOUD_SIGNUP_URL = signupUrl('site'); export const CLOUD_SIGNIN_URL = 'https://cloud.objectos.ai/_console/login'; /**