From e03c71aa48935f10e95ecd091b449af8648bb965 Mon Sep 17 00:00:00 2001 From: 0xNyk <0xnykcd@googlemail.com> Date: Tue, 15 Sep 2026 01:12:58 +0700 Subject: [PATCH 1/4] feat(landing): DataFast analytics, goals, Polar attribution, crawler tracking - Cookieless DataFast build injected after the load event, served first-party through vercel.json rewrites (/js/script.cookieless.js, /api/events). A head queue stub keeps goals fired before it loads. Cookieless because the landing has no consent banner. - Goals: download_dmg and github_click via data-fast-goal with location; scroll_pricing and scroll_faq scroll goals; license_key_copied on the success page. buy_pro_click is sent by a click handler that holds a plain click for 250ms before following /buy, because DataFast posts goals with an XHR the browser cancels when the page navigates to checkout. - Revenue attribution: the success page carries the tag, which reads the Polar checkout_id and reports a payment event. - middleware.ts (Vercel Routing Middleware) reports known AI crawler requests via @datafast/ai-crawl 1.0.9 (zero deps, audited), scheduled with waitUntil; no-op until DATAFAST_WEBSITE_ID, now set in production. - scripts/datafast-funnels.mjs defines three funnels for the Account API. Evidence (real DataFast script, events captured locally, nothing sent): pageview, download_dmg{hero}, scroll_pricing, buy_pro_click{hero} before navigation at 284ms, payment{polar_checkout_id} and license_key_copied on the success page, zero cookies set. Claude-Session: https://claude.ai/code/session_01CvRJfFeFvF96jhBFujxvHN --- landing/buy/success/index.html | 42 ++++++++++- landing/index.html | 108 +++++++++++++++++++++++---- landing/middleware.ts | 25 +++++++ landing/package.json | 6 +- landing/vercel.json | 10 +++ scripts/datafast-funnels.mjs | 131 +++++++++++++++++++++++++++++++++ 6 files changed, 302 insertions(+), 20 deletions(-) create mode 100644 landing/middleware.ts create mode 100644 scripts/datafast-funnels.mjs diff --git a/landing/buy/success/index.html b/landing/buy/success/index.html index dca957f..fb65b39 100644 --- a/landing/buy/success/index.html +++ b/landing/buy/success/index.html @@ -10,6 +10,29 @@ /> + +
@@ -35,11 +58,21 @@- If no key is shown here, copy your key from Polar customer portal or receipt email. +
+ If no key is shown here, copy your key from Polar customer portal or + receipt email.
- Pro is the convenience layer: signed installers, in-app updates, - and priority support. Free still includes the full local dictation + Pro is the convenience layer: signed installers, in-app updates, and + priority support. Free still includes the full local dictation workflow.
- The app claims it automatically on first activation. If your - install lands in the first 100, Pro is enabled instantly at no - cost. + The app claims it automatically on first activation. If your install + lands in the first 100, Pro is enabled instantly at no cost.