Skip to content

Dashboard channel reporting: reconcile tabs, split Google Ads, refine classification, add per-channel growth chart#7

Open
SushankSinha wants to merge 3 commits into
mainfrom
6-dashboard-channel-reporting
Open

Dashboard channel reporting: reconcile tabs, split Google Ads, refine classification, add per-channel growth chart#7
SushankSinha wants to merge 3 commits into
mainfrom
6-dashboard-channel-reporting

Conversation

@SushankSinha

Copy link
Copy Markdown

Summary

Makes the dashboard's channel reporting consistent and complete: the per-channel tabs now tie out to the Overview, Google Ads is split from organic Google into its own channel and tab, several channels that leaked into "Other" are correctly classified, and every channel tab gets the same 30-day growth chart as the Overview, populated with its own data.

Closes #6.

Description

Builds on the session_any_source change (PR #4, issue #3).

1. Tab reconciliation. Per-session classification (classified_sessions) now resolves a session's source the same way attributed_signups does.

2. Google Ads as its own channel. SOURCE_CASE_SQL classifies utm_source=google as google_ads (checked before organic Google so a paid click is paid even with a google.com referrer). Adds a googleAdsConversions count to /api/totals, a /api/google-ads landing-page endpoint, an Overview card, a sidebar tab, and a GoogleAdsTab component.

3. Classification refinements. utm_medium=youtube / utm_medium=linkedin route to those channels (recovering links mis-tagged utm_source=description); the Brevo match widens to referrer_domain ILIKE '%brevo%'; the AI-chat sub-source also matches utm_source (chatgpt / perplexity / copilot); ecosia and regional Yahoo are added to "Other search engine". These correct headline channel counts and tidy the Other drill-down without changing the Other total for the relabels.

4. Per-channel growth charts. New /api/source-growth?source= endpoint returns daily conversions over the last 30 days plus the all-time cumulative total per channel (same shape as /api/user-growth). The UserGrowthChart gains optional title / cumulativeLabel / dailyLabel props, and the LinkedIn / YouTube / Google / Google Ads tabs render it between the cards and the table. Fetched only for the active channel tab.

Validated on a full local replica: tab totals match the Overview for every range tested; Google split is clean (google + google_ads equals the old combined Google); classification refinements move the expected counts with the Other total preserved for relabels.

What type of PR

  • Bug fix (tab reconciliation, classification correctness)
  • New feature (Google Ads channel/tab, per-channel growth charts)
  • Refactor
  • Documentation
  • Breaking change (adds googleAdsConversions to the /api/totals response shape)

Screenshots

Overview tab with separate card for Google Ads Attribution
image

LinkedIn, Youtube and Google Analytics with chart

image image image

Checklist

  • Scoped to analytics_dashboard (backend server/index.js + frontend tab/card/chart files).
  • tsc -b clean; verified on a full local replica.
  • Channel tab conversion totals reconcile with the Overview.
  • google + google_ads equals the previous combined Google count.

@SushankSinha SushankSinha requested a review from PritamU June 30, 2026 20:14
@SushankSinha SushankSinha self-assigned this Jun 30, 2026
@SushankSinha SushankSinha added bug Something isn't working enhancement New feature or request labels Jun 30, 2026
@SushankSinha SushankSinha linked an issue Jun 30, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard channel reporting

1 participant