Date filtering is a fundamental feature in Formora’s analytics suite, allowing you to isolate and analyze your form performance data for specific time periods. The DateRangePickerWithPresets component is your primary tool for this.

Why Use Date Filtering?

  • Focus Your Analysis: Zero in on data from a particular timeframe relevant to your query (e.g., the duration of a marketing campaign).
  • Compare Performance: Easily compare metrics across different periods (e.g., this week vs. last week, this month vs. the same month last year).
  • Identify Trends: Observe how metrics change over specific intervals.
  • Troubleshoot Issues: If you notice a sudden change in performance, you can isolate the date range to investigate potential causes.
  • Generate Period-Specific Reports: Create reports for defined intervals like monthly, quarterly, or annually.

Accessing the Date Range Selector

The date range selector (DateRangePickerWithPresets) is a prominent and persistent element on your Formora analytics page. It typically appears near the top, allowing you to easily adjust the timeframe for your analysis.

The Date Range Picker with Presets in the Formora Analytics Page

Date Filtering Options

Formora’s DateRangePickerWithPresets provides a combination of preset date ranges for convenience and a custom range option for precise selection. All dates are treated as Start of Day for from and End of Day for to.

Default Date Range

Upon loading the analytics page:

  • Free Plan Users: The date range defaults to the last 7 days (e.g., 6 days prior up to today, inclusive).
  • Paid Plan Users (Basic, Pro): The date range defaults to the last 30 days (e.g., 29 days prior up to today, inclusive).

This initial range is set unless a user has previously made a manual date selection that might be persisted.

How Date Filtering Affects Analytics

Once you select or update a date range:

  • All Data Updates: Every analytics component on the page—Key Metrics Scorecards (AnalyticsStatsCards), Submissions Over Time chart (SubmissionsOverTimeChart), Device Breakdown chart (DeviceBreakdownChart), Geolocation Globe (GeolocationGlobe) & Table (LocationBreakdownTable), Top Referrers card (TopReferrersCard), and UTM Sources table (UTMSourcesTable)—will refresh to display data only from within that chosen timeframe. (Exception: “Total Views” in AnalyticsStatsCards remains all-time).
  • Data Fetching: The page.tsx component re-fetches response data from Supabase, applying gte (greater than or equal to) for the start date and lte (less than or equal to) for the end date to the created_at field of the responses. For Free plan users, the query itself is adjusted to not request data older than 7 days from the present, even if the picker visually allows a broader selection that then gets corrected.

Formora Analytics Dashboard showing various components updated to reflect a selected date range.

Use Cases for Date Filtering

  • Post-Campaign Review: Set the date range to the exact start and end dates of a marketing campaign to measure its direct impact on form views and submissions.
  • Monthly/Quarterly Reporting: Select “Last Month” or “Last Quarter” to gather data for regular performance reports.
  • A/B Test Analysis: If you ran an A/B test on your form for a specific week, filter to that week to see the results.
  • Troubleshooting Declines: If you see a drop in submissions, you can narrow down the date range day by day to pinpoint when the decline started, helping to correlate it with any changes or external events.
  • Year-over-Year (YoY) Growth: Use the custom range to select the same period from the current year and the previous year to assess long-term growth (e.g., Jan 1 - Jan 31, 2024 vs. Jan 1 - Jan 31, 2023).

Interaction with Other Analytics Filters

Date filtering works in conjunction with other filters on the analytics page, such as the Form Selector.

For example, you can view:

  • Submissions for “Form A” from the Last 7 Days.
  • Geolocation data for “All Forms” during “Last Month” (respecting plan limitations).

The ability to effectively filter by date is crucial for transforming raw analytics data into meaningful insights and actionable intelligence. Be mindful of the 7-day data visibility limitation for Free plan users when analyzing historical trends.