Set up first-party attribution and tracked short links
Ready nowA tracking script and /api/t/* routes that capture visits, touches, bot-filtered sessions, registration and booking events into cc_ tables, send server-side Meta CAPI events, accept Stripe or PayPal sale webhooks, sync Meta ad spend, and render an /attribution page with a report function in Postgres.
Kit
No separate kit. The playbook is self-contained.
You need
| Account | Why | Free or paid | Plan |
|---|---|---|---|
| Supabase | Postgres database, auth (dashboard logins), row level security, Realtime pulse, Edge Functions and pg_cron for every dashboard, the attribution tables, booking alerts and the Brain state. | Free tier available | Pro (25 USD/mo) for anything a client logs into. The free tier pauses a project after 7 days without traffic and caps an org at 2 active projects; a paused free project took three client dashboards offline at once (a project log). |
| Vercel | Hosts every site, funnel, dashboard and serverless API (subscribe, book, attribution, AC proxy). Runs the cron jobs declared in vercel.json. | Free tier available | Pro (20 USD/mo per seat). The Hobby plan forbids commercial use, so any client site or paid product must be on Pro. Hobby is fine for a personal portfolio. |
| Meta Business Suite (Pixel, Conversions API, Marketing API) | Facebook and Instagram ads. The funnel fires Pixel events, the attribution system sends server-side Conversions API events, the Meta Ads tab pulls ad-level insights, and social posting reaches your Pages through Zernio. | Free | Business account is free; you pay for ad spend only. Requires a verified business and a domain verification TXT record for the Pixel. |
| Stripe | Payments for the Hook Book (checkout + webhook provisions the account) and sale events for first-party attribution. | Free | No monthly fee; 2.9% + 30c per card charge. Pick Stripe OR PayPal before wiring attribution. |
| PayPal (Developer) | Alternative to Stripe for sale webhooks into first-party attribution. | Free | No monthly fee; per-transaction fees. |
| ActiveCampaign | Email list, broadcasts, automations and tags. The email engine drafts into a dashboard queue and sends through the AC API; funnels subscribe leads via the API; replies come back through an AC webhook. | Paid | Marketing Lite or Plus (from about 15 USD to 49 USD/mo at 1,000 contacts). API access is on every plan. Webhooks (for reply tracking) need automations, which Lite has. |
| Calendly | Booking page for discovery chats. The funnel embeds it, the booking-alert system polls it, the calls page reads upcoming events. | Free tier available | Free plan is enough for one event type and the API (Personal Access Tokens work on free). Standard (10 USD/mo) adds webhooks and reminders; the systems here poll instead, so free works. |
What you bring
- Your Meta Pixel id and your conversions token
- Your tracking convention: the ad URL parameter on every ad, and the tag on every email link
- Your payment processor choice, and the webhook secret
- Your destinations for short links
The steps
- Create the accounts and set the env
- Create the tables, views, report function and cron
- Put the tracker on every page and wire the write routes
- Tag every ad and turn on server-side conversions
- Tag email and organic links
- Wire payments and phone sales
- Make booked calls count
- Create short links
- Render the report and verify the numbers against ground truth
Goes further if you have already built Build the Facebook ads funnel (opt-in, self-hosted VSL, booking page, booked page, alerts). You can build this without it.
Get the full playbook
Part of: Get your database sorted