---
title: "Goal conversion statistics"
method: GET
path: "/v1/projects/{projectId}/goals/stats"
tags: ["Goals"]
---

# Goal conversion statistics

`GET /v1/projects/{projectId}/goals/stats`

## Request

- Base URL: `https://hootlens-api-368877148687.us-east1.run.app`
- URL: `https://hootlens-api-368877148687.us-east1.run.app/v1/projects/{projectId}/goals/stats`
- Auth: HTTP bearer

Visits that converted over all visits, per goal, with a 95% Wilson interval. A goal counts only the days after it began. Ranges are limited to 92 days and default to the last 30.

Required token scopes are listed in x-hootlens-scopes. A signed-in person needs the matching permission on the site instead (the viewer and editor roles are presets of the permissions).

## Path parameters

- `projectId` string, required: An identifier: 1 to 80 letters, digits, underscores or hyphens.

## Query parameters

- `from` integer
- `to` integer

## Response `200`

The statistics.

- GoalStats
  - `from` integer, required: Epoch milliseconds.
  - `to` integer, required: Epoch milliseconds.
  - `sessions` integer, required
  - `goals` GoalStat[], required
    - `goalId` string, required
    - `name` string, required
    - `kind` 'click' | 'page', required
    - `sessions` integer, required
    - `conversions` integer, required
    - `rate` number, nullable, required
    - `interval` number[], nullable, required
    - `since` integer, required: When counting under the goal's current definition began.

## Other responses

- `400`: The request fields are invalid.
- `401`: The credential is missing, expired or revoked.
- `403`: The credential or the person's permissions on the site do not permit this action.
- `404`: The site, or the record inside it, does not exist or the caller is not a member (a non-member cannot tell the two apart).
- `429`: A rate limit or a per-site limit was reached.

---

[API](https://skmtc.dev/hootlens/apis/hoot-lens-api.md) · [All operations](https://skmtc.dev/hootlens/apis/hoot-lens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hootlens/apis/hoot-lens-api/revisions/f64f8dc7b84e?raw)
