Skip to content

feat(competitors): add a date range filter to the Competitors page #892

Closed

Description

@gkhngyk

Description

The Competitors page always shows the last 30 days (#951). competitors/page.tsx builds that window in last30Days() (line 1149) and passes it to getCompetitorComparison (line 1185). There is no control to change it, so a marketer can't compare the last week with the last quarter, or look at all-time numbers.

Everything needed already exists:

Proposed behavior

Notes

Always pass a days window for the benchmark, including all-time (days: {}), so the read stays on the rollup tables. A raw scan over a large brand's results exceeds the statement timeout. Reusing or extracting Insights' getDateRange is preferred over writing a new one, and last30Days() can go once the filter drives the window.

Run yarn lint and yarn build from web/ before opening the PR — see CONTRIBUTING.md.

Activity

  1. added
    enhancement
    help wanted
    on Oct 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

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions