Skip to content

AI Traffic: empty date range shows the "add the tracking snippet" onboarding card instead of a period-specific message #608

Closed

Description

@gkhngyk

Problem

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.

Evidence

Suggested fix

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

  1. added
    enhancement
    good first issue
    on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions