Skip to content

feat(landing): DataFast analytics, goals, Polar attribution, crawler tracking - #24

Merged
0xNyk merged 4 commits into
mainfrom
feat/landing-datafast
Sep 14, 2026
Merged

0xNyk merged 4 commits into
mainfrom
feat/landing-datafast

Conversation

@0xNyk

@0xNyk 0xNyk commented Sep 14, 2026

Copy link
Copy Markdown
Member

What

  • Cookieless DataFast tag, injected after load, served first-party via vercel.json rewrites.
  • Goals: download_dmg, github_click, scroll_pricing, scroll_faq, buy_pro_click (click handler with a 250 ms hand-off so the goal is not cancelled by the checkout redirect), license_key_copied.
  • Polar revenue attribution on /buy/success (tag reads checkout_id).
  • AI crawler tracking in landing/middleware.ts; DATAFAST_WEBSITE_ID set in Vercel production.
  • scripts/datafast-funnels.mjs with three funnels.

Verification

Real DataFast cookieless script in Chromium against the served landing, events captured locally: pageview, download goal, scroll goal, buy goal sent before navigation (284 ms), payment attribution and copy goal on the success page, zero cookies. Prettier clean.

https://claude.ai/code/session_01CvRJfFeFvF96jhBFujxvHN

…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
@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
dictx Ready Ready Preview Sep 14, 2026 6:27pm UTC

Request Review

The first preview build warned that Edge is deprecated for Routing
Middleware and type-checking reported process as undeclared.

Claude-Session: https://claude.ai/code/session_01CvRJfFeFvF96jhBFujxvHN
Returning undefined is not a pass-through on the Node.js runtime: the
preview served 500 for matched pages. Return the empty response with
x-middleware-next: 1, which is what next() from @vercel/functions returns.

Claude-Session: https://claude.ai/code/session_01CvRJfFeFvF96jhBFujxvHN
On preview the Node.js runtime served every matched HTML page as 500
while the Edge build of the same middleware served 200. Keep the
explicit pass-through response and the process type.

Claude-Session: https://claude.ai/code/session_01CvRJfFeFvF96jhBFujxvHN
@0xNyk
0xNyk merged commit 16b2104 into main Sep 14, 2026
3 of 6 checks passed
@0xNyk
0xNyk deleted the feat/landing-datafast branch September 14, 2026 18:30

This branch was successfully deployed

1 active deployment
Preview — d09c9d0a Deployed Sep 14, 2026 by vercel[bot]
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