---
title: Analytics & Session Replay Providers
description: >-
  Add PostHog, Mixpanel, Amplitude, Hotjar, Microsoft Clarity, Fathom, Pirsch,
  Heap, LogRocket, Segment, Clearbit, Hightouch, or Koala to your
  documentation site with a docs.json block.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/docs/llms.txt). Append `.md` to any page URL for its markdown version.

Jamdesk loads scripts for 13 additional analytics, session-replay, and identity providers directly from `docs.json`. Add the provider's block under `integrations`, and Jamdesk injects its script on every page of your published docs site.

<Info>
Each value is checked against a strict format before Jamdesk will load the script. A value in the wrong format (extra characters, wrong prefix, wrong length) is silently skipped and never rendered — no error page, no broken script tag. If a provider isn't loading, re-copy the value from its dashboard and check it against the format below.
</Info>

## Configure from the Dashboard

The fastest way to set any of these up: **Dashboard → Integrations**. Pick a provider's card, paste its key, and Jamdesk commits the `docs.json` block for you and triggers a rebuild (GitHub-connected projects only). The sections below are for editing `docs.json` directly, or for CLI-only projects.

## PostHog

Product analytics, session replay, and feature flags.

**Format:** Project API key starts with `phc_`, followed by 8-64 letters or numbers. The optional API host must be an `https://` URL.

<Info>
Find your key at **Settings → Project → Project API key** in PostHog.
</Info>

```json docs.json
{
  "integrations": {
    "posthog": {
      "apiKey": "phc_Kj8fPqZx92RmNbTeYcWs",
      "apiHost": "https://us.i.posthog.com"
    }
  }
}
```

`apiHost` is optional and defaults to `https://us.i.posthog.com`. Set it to your EU cloud host or reverse-proxy URL if you use one.

## Mixpanel

Event analytics and funnels.

**Format:** Project token is exactly 32 lowercase hex characters (`0-9`, `a-f`).

<Info>
Find your token at **Project Settings → Access Keys → Project Token** in Mixpanel.
</Info>

```json docs.json
{
  "integrations": {
    "mixpanel": {
      "projectToken": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
    }
  }
}
```

## Amplitude

Product analytics and behavioral cohorts.

**Format:** API key is exactly 32 lowercase hex characters (`0-9`, `a-f`).

<Info>
Find your key at **Settings → Projects → your project → API Key** in Amplitude.
</Info>

```json docs.json
{
  "integrations": {
    "amplitude": {
      "apiKey": "f6e5d4c3b2a1908877665544332211ff"
    }
  }
}
```

## Hotjar

Heatmaps and session recordings.

**Format:** Site ID is 1-12 digits. Snippet version is 1-4 digits (usually `6`).

<Info>
Find both at **Sites & Organizations → your site** in Hotjar.
</Info>

```json docs.json
{
  "integrations": {
    "hotjar": {
      "hjid": "3482910",
      "hjsv": "6"
    }
  }
}
```

<Warning>
Hotjar records visitor sessions. If GDPR, CCPA, or similar regulations apply to your readers, gate it behind [Cookie Consent](/integrations/cookie-consent).
</Warning>

## Microsoft Clarity

Free heatmaps and session recordings.

**Format:** Project ID is 4-32 letters or numbers.

<Info>
Find your project ID at **Settings → Overview → Project ID** in Clarity.
</Info>

```json docs.json
{
  "integrations": {
    "clarity": {
      "projectId": "qbxk2paw9m"
    }
  }
}
```

<Warning>
Clarity records visitor sessions. If GDPR, CCPA, or similar regulations apply to your readers, gate it behind [Cookie Consent](/integrations/cookie-consent).
</Warning>

## Fathom

Privacy-first, cookie-free analytics.

**Format:** Site ID is 4-16 letters or numbers.

<Info>
Find your site ID at **Settings → Sites → your site** in Fathom.
</Info>

```json docs.json
{
  "integrations": {
    "fathom": {
      "siteId": "ABCD1234"
    }
  }
}
```

## Pirsch

Cookie-free, privacy-friendly analytics.

**Format:** Identification code is 4-64 letters or numbers.

<Info>
Find your code at **Settings → Developer → Identification Code** in Pirsch.
</Info>

```json docs.json
{
  "integrations": {
    "pirsch": {
      "id": "Jd8fK2pQmZx9AeRt"
    }
  }
}
```

## Heap

Automatic event capture, no manual instrumentation.

**Format:** App ID is 6-20 digits.

<Info>
Find your App ID at **Account → Manage → Projects** in Heap.
</Info>

```json docs.json
{
  "integrations": {
    "heap": {
      "appId": "1234567890"
    }
  }
}
```

## LogRocket

Session replay with console and network logs.

**Format:** App ID is two slug segments separated by a slash — `org-slug/app-slug` — each 2-64 lowercase letters, numbers, or hyphens.

<Info>
Find your App ID at **Settings → Project Setup** in LogRocket.
</Info>

```json docs.json
{
  "integrations": {
    "logrocket": {
      "appId": "acme-inc/docs-site"
    }
  }
}
```

<Warning>
LogRocket records visitor sessions, including console and network activity. If GDPR, CCPA, or similar regulations apply to your readers, gate it behind [Cookie Consent](/integrations/cookie-consent).
</Warning>

## Segment

Route documentation events to every downstream tool from one source.

**Format:** Write key is 10-64 letters or numbers (no hyphens or underscores).

<Info>
Find your write key at **Connections → Sources → your JS source → Settings → API Keys** in Segment.
</Info>

```json docs.json
{
  "integrations": {
    "segment": {
      "key": "hcQ8wK9pXeR2mNq7"
    }
  }
}
```

## Clearbit

Identify and enrich anonymous visitors.

**Format:** Public API key starts with `pk_`, followed by 6-64 letters or numbers.

```json docs.json
{
  "integrations": {
    "clearbit": {
      "publicApiKey": "pk_4f8a2e1c9b6d"
    }
  }
}
```

## Hightouch

Send documentation events straight to your data warehouse.

**Format:** Write key is 8-128 characters (letters, numbers, `:`, `.`, `_`, `-`). The optional API host is 4-64 characters (letters, numbers, `.`, `-`).

```json docs.json
{
  "integrations": {
    "hightouch": {
      "writeKey": "wk_prod_4f8a2e1c9b6d",
      "apiHost": "us-east-1.hightouch-events.com"
    }
  }
}
```

`apiHost` is optional — only needed for a self-hosted or region-specific Hightouch events endpoint.

## Koala

Identify high-intent visitors for sales and marketing.

**Format:** Public API key starts with `pk_`, followed by 6-64 letters or numbers.

```json docs.json
{
  "integrations": {
    "koala": {
      "publicApiKey": "pk_7e3a9c1f6b2d"
    }
  }
}
```

## Consent Gating

All 13 providers above respect `integrations.cookies`. When it's set, none of their scripts load until your consent banner records approval — see [Cookie Consent](/integrations/cookie-consent) for the full setup. Without it, every script loads for every visitor on page load.

## Related Articles

<Columns cols={3}>
  <Card title="Cookie Consent" icon="cookie-bite" href="/integrations/cookie-consent">
    Gate these scripts behind visitor consent
  </Card>
  <Card title="Google Analytics" icon="chart-simple" href="/integrations/google-analytics">
    Add GA4 with a measurement ID
  </Card>
  <Card title="Support & Chat Providers" icon="comments" href="/integrations/support-chat">
    Intercom and Front Chat live-chat widgets
  </Card>
</Columns>
