> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Umami

> Connect Umami to Nekt and sync your website analytics data.

Umami is an open-source, privacy-focused web analytics platform. This connector extracts website traffic, session, event, and metrics data from Umami Cloud or self-hosted instances.

## Configuration

### 1. Add your API Key

To connect Umami to Nekt, you need an API key.

**For Umami Cloud:**

1. Log in to your Umami Cloud account
2. Navigate to **Settings** > **API Keys**
3. Create a new API key
4. Copy the key and paste it into the **API Key** field in Nekt

**For self-hosted instances:**

1. Log in to your Umami instance
2. Generate an API key from your account settings
3. Copy the key and update the **Base URL** field to point to your instance (e.g., `https://analytics.yourdomain.com/api`)

### 2. Select streams

Choose which data streams to sync. Available streams are listed below.

### 3. Configure data source

Set the **Start Date** to define how far back to sync data. If not set, defaults to 30 days ago.

Optionally, provide specific **Website IDs** to limit the sync to certain websites. If left empty, all websites accessible by the API key will be synced.

### 4. Check your new source

After saving, run a sync to verify that data is flowing correctly.

## Streams and Fields

<AccordionGroup>
  <Accordion title="websites">
    List of all websites tracked in Umami.

    | Field     | Type     | Description               |
    | --------- | -------- | ------------------------- |
    | id        | string   | Website unique identifier |
    | name      | string   | Website display name      |
    | domain    | string   | Website domain            |
    | shareId   | string   | Share identifier          |
    | teamId    | string   | Associated team ID        |
    | createdAt | datetime | Creation timestamp        |
    | updatedAt | datetime | Last update timestamp     |
  </Accordion>

  <Accordion title="sessions">
    Individual visitor sessions with device, location, and browsing metadata.

    | Field        | Type     | Description                      |
    | ------------ | -------- | -------------------------------- |
    | id           | string   | Session unique identifier        |
    | websiteId    | string   | Associated website ID            |
    | hostname     | string   | Hostname visited                 |
    | browser      | string   | Browser name                     |
    | os           | string   | Operating system                 |
    | device       | string   | Device type                      |
    | screen       | string   | Screen resolution                |
    | language     | string   | Browser language                 |
    | country      | string   | Visitor country code             |
    | subdivision1 | string   | Region/state                     |
    | subdivision2 | string   | Sub-region                       |
    | city         | string   | Visitor city                     |
    | createdAt    | datetime | Session start time               |
    | visitId      | string   | Visit identifier                 |
    | views        | integer  | Number of page views             |
    | events       | integer  | Number of events                 |
    | totaltime    | integer  | Total session duration (seconds) |
    | lastAt       | datetime | Last activity timestamp          |
  </Accordion>

  <Accordion title="session_stats">
    Aggregated session statistics per website.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | website\_id | string  | Website identifier |
    | pageviews   | integer | Total page views   |
    | visitors    | integer | Unique visitors    |
    | visits      | integer | Total visits       |
    | countries   | integer | Unique countries   |
    | events      | integer | Total events       |
  </Accordion>

  <Accordion title="events">
    Individual tracked events (page views, custom events).

    | Field          | Type     | Description             |
    | -------------- | -------- | ----------------------- |
    | id             | string   | Event unique identifier |
    | websiteId      | string   | Associated website ID   |
    | sessionId      | string   | Associated session ID   |
    | visitId        | string   | Visit identifier        |
    | urlPath        | string   | Page URL path           |
    | urlQuery       | string   | URL query string        |
    | referrerPath   | string   | Referrer URL path       |
    | referrerQuery  | string   | Referrer query string   |
    | referrerDomain | string   | Referrer domain         |
    | pageTitle      | string   | Page title              |
    | eventType      | integer  | Event type code         |
    | eventName      | string   | Custom event name       |
    | createdAt      | datetime | Event timestamp         |
  </Accordion>

  <Accordion title="event_stats">
    Aggregated event statistics per website.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | website\_id | string  | Website identifier |
    | events      | integer | Total event count  |
  </Accordion>

  <Accordion title="pageviews">
    Daily pageview and session counts per website.

    | Field       | Type    | Description          |
    | ----------- | ------- | -------------------- |
    | website\_id | string  | Website identifier   |
    | pageviews   | integer | Number of page views |
    | sessions    | integer | Number of sessions   |
  </Accordion>

  <Accordion title="metrics_url">
    Top pages ranked by view count.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | x           | string  | Page URL           |
    | y           | integer | View count         |
    | website\_id | string  | Website identifier |
  </Accordion>

  <Accordion title="metrics_referrer">
    Traffic sources ranked by visitor count.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | x           | string  | Referrer domain    |
    | y           | integer | Visitor count      |
    | website\_id | string  | Website identifier |
  </Accordion>

  <Accordion title="metrics_country">
    Visitor distribution by country.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | x           | string  | Country code       |
    | y           | integer | Visitor count      |
    | website\_id | string  | Website identifier |
  </Accordion>

  <Accordion title="metrics_device">
    Visitor distribution by device type.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | x           | string  | Device type        |
    | y           | integer | Visitor count      |
    | website\_id | string  | Website identifier |
  </Accordion>

  <Accordion title="metrics_event">
    Custom event names ranked by occurrence count.

    | Field       | Type    | Description        |
    | ----------- | ------- | ------------------ |
    | x           | string  | Event name         |
    | y           | integer | Event count        |
    | website\_id | string  | Website identifier |
  </Accordion>
</AccordionGroup>
