# get_analytics_status

Source: https://modulify.ai/docs/api/analytics/get-analytics-status

Reads whether visitor analytics is on for a site, whether the published site carries the tracking script, and whether it is collecting now.

- Title: Read the analytics status
- Scope: `analytics:read`
- Access: Read only
- Endpoint: `POST /v1/get_analytics_status`

It answers `enabled` for whether collection is switched on, `installed` for whether the published site carries the tracking script, `collecting` for whether it is collecting now, `published` and `lastPublishedAt` for whether and when the site was last published, and `apiUrl`, the base URL of the site's analytics API.

It is a database read that makes no analytics lookup, so it spends none of the 1,200 lookups access tokens share per site per hour. That also means `installed` reflects the last publish rather than a live check of the page, which `check_analytics_installation` makes by fetching the live page. See [What is counted](https://modulify.ai/docs/grow/analytics#what-is-counted).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/get_analytics_status`, sending the inputs below as a JSON object. The token needs the `analytics:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/get_analytics_status \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}'
```

Over MCP, the same method is the [get_analytics_status tool](https://modulify.ai/docs/mcp/analytics/get-analytics-status).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.