Repository navigation
feat(landing): DataFast analytics, goals, Polar attribution, crawler tracking - #24
Merged
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
load, served first-party viavercel.jsonrewrites.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./buy/success(tag readscheckout_id).landing/middleware.ts;DATAFAST_WEBSITE_IDset in Vercel production.scripts/datafast-funnels.mjswith 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