You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AI Traffic: empty date range shows the "add the tracking snippet" onboarding card instead of a period-specific message #608
The Traffic page has a single empty state driven by isEmpty = totalVisits === 0 && logs.length === 0, regardless of the selected date range. A brand with plenty of historical traffic that selects a narrow window (or 24h) with no visits is told "No traffic data yet — Add the tracking snippet to your website…" — implying their integration is broken when it isn't.
The Insights page already solved exactly this with a NoDataForPeriod state that names the selected range and offers a "Show all data" reset.
Track whether the brand has any traffic ever (a cheap total-count call without the date filter, or reuse the existing summary shape). When lifetime traffic exists but the current window is empty, render a "No traffic in this period" state naming the range with a button that resets the date filter; keep the current snippet-onboarding empty state only for brands with zero lifetime traffic.
Acceptance criteria
A brand with historical traffic and an empty selected window sees a period-specific message with a working "show all / reset range" action — not the snippet onboarding card.
A brand with no traffic at all still sees the existing onboarding empty state.
Activity