# Google Analytics

> Run Google Analytics by google online or via API. From $0.00000277 per second, no setup.

**URL:** https://inference.sh/apps/google/analytics
**Last updated:** 2026-10-15

---

Read Google Analytics 4 properties and run traffic, acquisition and realtime reports

- app: `google/analytics`
- maker: [google](https://inference.sh/apps/google.md)
- category: [other](https://inference.sh/apps/category/other.md)
- tasks: [analytics](https://inference.sh/apps/tag/analytics.md), [productivity](https://inference.sh/apps/tag/productivity.md)
- price: from $0.00000277/sec
- runs via: api, javascript and python sdk, belt cli, mcp

## analytics API Guide

### About
read google analytics 4 properties and run traffic, acquisition and realtime reports

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Setup Your API Key
Set `INFERENCE_API_KEY` as an environment variable. Get your key from settings → api keys.

```bash
export INFERENCE_API_KEY="inf_your_key"
```

#### Run and Get Result

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])


result = client.run({
        "app": "google/analytics@3q3rh6fj",
        "input": {}
    })

print(result["output"])
```

#### Stream Live Updates

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])


## stream=True yields updates as they arrive
for update in client.run({
        "app": "google/analytics@3q3rh6fj",
        "input": {}
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

### 2. Authentication
The API uses API keys for authentication. See the authentication docs for detailed setup instructions.

### 3. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "google/analytics@3q3rh6fj",
    "input": {
        "image": "/path/to/local/image.png",  # detected & uploaded
        "audio": "https://example.com/audio.mp3",  # url passed through
    }
})
```

#### Manual Upload

```python
## upload and get a hosted URL
file = client.files.upload("/path/to/file.png")
print(file.uri)  # https://cloud.inference.sh/...
```

### 4. Schema

#### Input
No input parameters defined.

#### Output
See task output for result format.

## other other apps

- [Google Search Console](https://inference.sh/apps/google/search-console.md): from $0.00000277/sec
- [HTTP Request](https://inference.sh/apps/infsh/http.md): from $0.00000277/sec
- [FID Score](https://inference.sh/apps/eval/fid-score.md): from $0.00055833/sec
- [CLIPScore](https://inference.sh/apps/eval/clipscore.md): from $0.00055833/sec
- [ArcFace Identity Similarity](https://inference.sh/apps/eval/arcface.md): from $0.00055833/sec

## faq

### how much does Google Analytics cost?

from $0.00000277/sec. you pay per run from your inference shell credits. no subscription is required.

### how do I run Google Analytics via api?

call google/analytics with the javascript or python sdk, the rest api, or `belt app run google/analytics` from a terminal. the api reference on this page lists every input.

### who makes Google Analytics?

Google Analytics is made by google and runs on inference shell. every google app is listed at https://inference.sh/apps/google.

### can my agent use Google Analytics?

yes. agents call it as a tool through the inference shell mcp server (https://api.inference.sh/mcp), the belt cli or the sdk, and pay per run like you do.

### what are the alternatives to Google Analytics?

other other apps on inference shell include Google Search Console, HTTP Request, FID Score, CLIPScore. they run through the same api, so switching is a one-line change.
