# Simple Analytics

Simple Analytics is a privacy-friendly and simple alternative to Google Analytics, offering straightforward analytics without cookies or trackers.

- **Category:** analytics
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 4
- **Triggers:** 0
- **Slug:** `SIMPLE_ANALYTICS`
- **Version:** 20260309_00

## Tools

### List Websites (Admin API)

**Slug:** `SIMPLE_ANALYTICS_ADMIN_API_LIST_WEBSITES`

Tool to list all websites associated with the authenticated user. Use after authenticating an admin account to retrieve website list.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Export Raw Data Points

**Slug:** `SIMPLE_ANALYTICS_EXPORT_API_GET_RAW_DATA`

Tool to export raw data points (page views and events) for a specific website. Use when you need to download CSV or JSON exports of site traffic.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fields` | array | No | List of data fields to include. Valid fields: added_date, added_iso, added_unix, browser_name, browser_version, country_code, device_type, document_referrer, duration_seconds, hostname, hostname_original, is_robot, is_unique, lang_language, lang_region, os_name, os_version, path, path_and_query, query, referrer_hostname, referrer_path, screen_height, screen_width, scrolled_percentage, session_id, user_agent, utm_campaign, utm_content, utm_medium, utm_source, utm_term, uuid, viewport_height, viewport_width |
| `format` | string ("csv" | "json") | No | Response format: 'csv' or 'json' |
| `to_date` | string | No | End date in YYYY-MM-DD format |
| `website` | string | Yes | Website domain or site ID to export data for |
| `from_date` | string | No | Start date in YYYY-MM-DD format |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get aggregated website stats

**Slug:** `SIMPLE_ANALYTICS_GET_AGGREGATED_STATS`

Tool to retrieve aggregated statistics for a specified website. Use when you need an overview of key metrics like visitors, pageviews, bounce rate, and more.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | string | No | End date in YYYY-MM-DD format. |
| `page` | string | No | Filter stats by specific page path. |
| `start` | string | No | Start date in YYYY-MM-DD format. |
| `source` | string | No | Filter stats by traffic source. |
| `compare` | string | No | Comparison range start date in YYYY-MM-DD format. |
| `website` | string | Yes | Website identifier (domain or custom code). |
| `referrer` | string | No | Filter stats by specific referrer host. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Send Server-Side Event

**Slug:** `SIMPLE_ANALYTICS_SEND_EVENT`

Tool to submit server-side events or pageviews to Simple Analytics. Use for mobile apps, backend tracking, or scenarios where JavaScript is not available. Supports custom metadata for enriched event data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ua` | string | Yes | User agent string. Avoid default library agents like 'python-requests'. Use a realistic browser user agent string. |
| `path` | string | No | Page path for pageviews (e.g., /my-page, /products/item-123) |
| `type` | string ("event" | "pageview") | Yes | Type of data point: 'event' for custom events or 'pageview' for page views |
| `event` | string | Yes | Event name for custom events (e.g., 'button_click', 'purchase') or 'pageview' for page views |
| `https` | boolean | No | Whether the connection is HTTPS. Set to true for secure connections. |
| `medium` | string | No | UTM medium parameter for tracking campaign mediums |
| `source` | string | No | UTM source parameter for tracking campaign sources |
| `unique` | boolean | No | Whether this is a unique visit. Set to true for the first visit from a user. |
| `content` | string | No | UTM content parameter for tracking campaign content variations |
| `campaign` | string | No | UTM campaign parameter for tracking campaign names |
| `hostname` | string | Yes | The hostname of the tracked website (e.g., example.com or composio.dev) |
| `language` | string | No | Language code (e.g., en-US, fr-FR, de-DE) |
| `metadata` | object | No | Custom metadata object with key-value pairs. All values must be strings. |
| `referrer` | string | No | Referrer URL (where the user came from) |
| `timezone` | string | No | Timezone (e.g., Europe/Amsterdam, America/New_York, UTC) |
| `screen_width` | integer | No | Screen width in pixels |
| `screen_height` | integer | No | Screen height in pixels |
| `viewport_width` | integer | No | Viewport width in pixels |
| `viewport_height` | integer | No | Viewport height in pixels |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
