---
title: "Get general statistics across all projects for a time frame"
method: GET
path: "/analytics/general-stats"
tags: ["Analytics"]
---

# Get general statistics across all projects for a time frame

`GET /analytics/general-stats`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/analytics/general-stats`
- Auth: HTTP bearer

## Query parameters

- `start_date` string, required
- `end_date` string, required
- `project_ids` integer[]
- `environment_id` integer
- `include_project_breakdown` boolean

## Response `200`

Successfully retrieved general statistics

- GeneralStatsResponse
  - `avg_bounce_rate` number, double, required
  - `avg_engagement_rate` number, double, required
  - `page_views_trend_percentage` number, double, nullable: Percentage change in page views vs previous period
  - `previous_page_views` integer, nullable: Previous period page views
  - `previous_unique_visitors` integer, nullable: Previous period unique visitors (same duration, shifted back)
  - `project_breakdown` ProjectStatsBreakdown[], required
    - `bounce_rate` number, double, required
    - `engagement_rate` number, double, required
    - `project_id` integer, required
    - `project_name` string, nullable
    - `total_page_views` integer, required
    - `total_visits` integer, required
    - `unique_visitors` integer, required
  - `total_events` integer, required
  - `total_page_views` integer, required
  - `total_projects` integer, required
  - `total_unique_visitors` integer, required
  - `total_visits` integer, required
  - `visitors_trend_percentage` number, double, nullable: Percentage change in unique visitors vs previous period

## Other responses

- `400`: Invalid date format or parameters
- `500`: Internal server error

## Changes

- **2026-04-25** `774be20905f2`: 4 info
  - added the optional property `page_views_trend_percentage` to the response with the `200` status
  - added the optional property `previous_page_views` to the response with the `200` status
  - added the optional property `previous_unique_visitors` to the response with the `200` status
  - added the optional property `visitors_trend_percentage` to the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/analytics/general-stats/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
