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

# PostHog source

> Connect PostHog to Chartcastr for automated product analytics charts. Track active users, growth accounting, events, and pageview trends over time.

## Overview

Use PostHog as a data source for Chartcastr. Connect your PostHog project with a Personal API Key and Chartcastr will pull active user metrics, growth accounting data, and event analytics to generate charts delivered automatically to Slack or email.

Chartcastr connects with read-only access to your PostHog project — it needs the `query:read` and `project:read` API key scopes.

## Setup

<Steps>
  <Step title="Create a PostHog Personal API Key">
    In PostHog, go to **Settings → Personal API Keys** ([direct link](https://us.posthog.com/settings/user-api-keys)) and create a new key. Grant it the **`query:read`** and **`project:read`** scopes. Copy the key — you'll need it in the next step.

    <Warning>
      Use a **Personal API Key** (starts with `phx_`), not the Project API Key. The Project API Key only works for event capture, not for reading analytics data.
    </Warning>
  </Step>

  <Step title="Find your Project ID">
    In PostHog, go to **Settings → Project** ([direct link](https://us.posthog.com/settings/project-details)) and copy your **Project ID** (a numeric value). You can also find it in the URL: `https://us.posthog.com/project/<PROJECT_ID>/`.
  </Step>

  <Step title="Connect in Chartcastr">
    In Chartcastr, go to **New Connection** and select **PostHog** as a source. Enter your Personal API Key, Project ID, and host URL. Click **Validate** to test the connection.

    <Info>
      **Host URL**: Use `https://us.posthog.com` for US Cloud or `https://eu.posthog.com` for EU Cloud. Self-hosted users should enter their own PostHog instance URL.
    </Info>
  </Step>

  <Step title="Select a metric">
    Choose which metric type you want to track. Each metric becomes its own source. You can add multiple sources to send different charts on different schedules.
  </Step>

  <Step title="Create a connection">
    Pick or add a destination (Slack channel or email), set the delivery frequency, and optionally enable AI summaries.
  </Step>
</Steps>

## Available Metrics

Chartcastr supports **13 pre-built PostHog metrics** across four categories.

<CardGroup cols={2}>
  <Card title="Active Users" icon="users">
    DAU, WAU, MAU, and combined DAU/WAU/MAU charts for engagement tracking.
  </Card>

  <Card title="Growth Accounting" icon="chart-line">
    New, retained, resurrected, and dormant user lifecycle stages.
  </Card>

  <Card title="Events" icon="bolt">
    Total event count and unique event users per day.
  </Card>

  <Card title="Pageviews" icon="eye">
    Total pageviews and unique pageview users per day.
  </Card>
</CardGroup>

<Card title="View all available charts" icon="list" href="/integrations/sources/posthog/available-charts">
  See the full list of PostHog metrics with chart types and descriptions.
</Card>

## API Key Scopes

Chartcastr requires the **`query:read`** and **`project:read`** scopes:

* **`query:read`** — Read-only access to PostHog's Query API for fetching analytics data
* **`project:read`** — Read-only access to project info (needed to validate the connection)

No write access is needed.

You can optionally restrict the API key to a specific project for additional security.

## Rate Limits

PostHog's Query API has rate limits of **120–2,400 requests/hour** depending on your PostHog plan, with a maximum of **3 concurrent queries** per project. Chartcastr respects these limits and batches queries efficiently.

## Next Steps

<CardGroup cols={2}>
  <Card title="Slack destination" icon="slack" href="/integrations/destinations/slack">
    Deliver PostHog charts to your Slack channels with AI summaries in the thread.
  </Card>

  <Card title="Email destination" icon="envelope" href="/integrations/destinations/email">
    Schedule PostHog reports to any inbox or distribution list.
  </Card>
</CardGroup>
