Skip to main content
Feature

First-touch attribution + CRM pipeline

Full UTM + ad-platform-click-ID capture on landing, persisted to a 90-day cookie + localStorage, auto-merged into every tracked event, and surfaced server-side on every lead-capture endpoint.

#tracking #attribution #ads #crm

Affected routes

/api/lead /api/inquiry /api/audit/submit /api/newsletter/subscribe /admin/inquiries /admin/leads /admin

Built on tools you trust

Vercel
Stripe
Cloudflare
GitHub
Linear
Slack
Resend
Sentry
Postgres
PostHog
Loom
Notion

← swipe · 12 tools →

What we shipped

End-to-end attribution from ad click through to admin CRM:

  • Client capture: UTM params (utm_source, utm_medium, utm_campaign, utm_content, utm_term) plus 6 ad-platform click IDs (gclid, fbclid, ttclid, li_fat_id, msclkid, twclid) plus referrer + landing path. Stored in localStorage AND a hyt_attr cookie (90-day, SameSite=Lax). First-touch wins.
  • Auto-merge: every track() call merges attribution into the dispatched event before fan-out to PostHog, GA4, Meta, LinkedIn, Reddit, X.
  • Server-side: /api/lead, /api/inquiry, /api/audit/submit, /api/newsletter/subscribe all read the cookie and persist attribution into the inquiry/subscriber metadata.
  • Slack alerts include compact attribution summary (src=meta · camp=spring · fbclid).
  • Admin views: /admin/inquiries + /admin/leads gain a "Campaign" column. CSV exports include 11 attribution columns. Dashboard adds top-campaigns + top-LPs rollups.

Why

Without attribution, paid ad spend is essentially blind. Now every conversion event downstream — pixel fires, CRM rows, Slack alerts, CSV exports — carries the original campaign metadata.

Engagement events

Same pass also wired up scroll_25/50/75/100, engaged_30s/60s/180s, and outbound_link events that were defined in the catalog but never fired before.

See the full changelog

Or peek at what we’re building next on the roadmap.