# check_analytics_installation

Source: https://modulify.ai/docs/api/analytics/check-analytics-installation

Checks whether analytics is installed and collecting on a site, and whether the site is published yet.

- Title: Check analytics is installed
- Scope: `analytics:read`
- Access: Read only
- Endpoint: `POST /v1/check_analytics_installation`

It fetches the live page at the site's [free web address](https://modulify.ai/docs/publish/your-web-address) and looks for the tracking script, so it is a real network round trip rather than a database read. It answers `installed`, `published` and the `url` it checked, and a page that cannot be fetched reads `installed` false rather than failing. A site that is not published yet answers `installed` false without fetching anything.

Use it first when numbers come back empty. It makes no analytics lookup, so it spends none of the 1,200 lookups access tokens share per site per hour. 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/check_analytics_installation`, 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/check_analytics_installation \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}'
```

Over MCP, the same method is the [check_analytics_installation tool](https://modulify.ai/docs/mcp/analytics/check-analytics-installation).

## 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.