From 5d32d602f513c15580d599ceb95a01b4cea42073 Mon Sep 17 00:00:00 2001 From: Francis Terrero Date: Thu, 12 Mar 2026 13:08:45 -0400 Subject: [PATCH] feature: Add Cello referral attribution to special offer pages Forward Cello query params (productId, ucc, celloN) from the landing page URL to the checkout redirect, and embed the Cello attribution script on special offer pages for referral personalization banner. --- src/lib/auth.ts | 8 ++++++++ src/pages/specialoffer.tsx | 2 ++ src/pages/specialoffer/[filename].tsx | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index c528db1a3..5da98ab8e 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -265,6 +265,14 @@ export function checkout({ planId, promoCodeId, planType, mode, currency, gclid mode && params.set('mode', mode ? mode : 'subscription'); gclid && params.set('gclid', gclid); + const currentParams = new URLSearchParams(globalThis.location.search); + const celloProductId = currentParams.get('productId'); + const celloUcc = currentParams.get('ucc'); + const celloN = currentParams.get('celloN'); + if (celloProductId) params.set('productId', celloProductId); + if (celloUcc) params.set('ucc', celloUcc); + if (celloN) params.set('celloN', celloN); + window.location.href = AUTH_FLOW_URL + `${pathname}?${params.toString()}`; } diff --git a/src/pages/specialoffer.tsx b/src/pages/specialoffer.tsx index dd8945964..7db0a67d5 100644 --- a/src/pages/specialoffer.tsx +++ b/src/pages/specialoffer.tsx @@ -1,4 +1,5 @@ import Layout from '@/components/layout/Layout'; +import Script from 'next/script'; import { PromoCodeName } from '@/lib/types'; import Footer from '@/components/layout/footers/Footer'; @@ -83,6 +84,7 @@ function SpecialOffer({ return ( +