Skip to content

feat(insights): top traffic sources per event in Builder Insights#4222

Merged
navillanueva merged 8 commits into
masterfrom
feat/builder-insights-improved-utm
May 22, 2026
Merged

feat(insights): top traffic sources per event in Builder Insights#4222
navillanueva merged 8 commits into
masterfrom
feat/builder-insights-improved-utm

Conversation

@navillanueva
Copy link
Copy Markdown
Contributor

@navillanueva navillanueva commented May 21, 2026

What

Adds a Top traffic sources (90d) column to the Event history table on the Builder Insights dashboard (/profile?tab=insights). Each row shows the top-3 channels that drove visitors to that hackathon, with visitor counts.

How

  • New batched HogQL helper getTopHackathonTrafficSourcesBatch in server/services/hackathonTrafficSources.ts — single query returns top-N sources per hackathon using ClickHouse LIMIT N BY hackathon_id.
  • Bucketing is channel-mix only. UTM-tagged links keep utm_source / utm_campaign granularity (and utm_content if you want per-poster). Organic X/LinkedIn bucket to X (untagged) / LinkedIn (untagged) — those platforms strip the originating tweet/post from the Referer header so per-account attribution isn't possible without UTMs.
  • PostHog's \$direct sentinel (no referrer + no real UTM) is excluded at the WHERE level so it never competes for a top-3 slot.
  • Hackathon attribution comes from the URL pattern (/hackathons/<uuid> or /events/<uuid>) — no new client-side instrumentation needed.

@navillanueva navillanueva self-assigned this May 21, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

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

Project Deployment Actions Updated (UTC)
builder-hub Ready Ready Preview, Comment May 22, 2026 9:02pm

Request Review

@navillanueva navillanueva marked this pull request as ready for review May 22, 2026 20:54
@navillanueva navillanueva changed the title feat(hackathons): top traffic sources per event via PostHog feat(insights): top traffic sources per event in Builder Insights May 22, 2026
@navillanueva navillanueva merged commit a5d065f into master May 22, 2026
5 checks passed
@navillanueva navillanueva deleted the feat/builder-insights-improved-utm branch May 22, 2026 22:02
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.

2 participants