Anthropic

Anthropic

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Connect Anthropic to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.

Enter your Anthropic Admin API key to pull your organization's Claude usage, cost, and admin data into the PostHog Data warehouse.

Create an Admin API key (prefixed sk-ant-admin...) in your Anthropic Console. Only organization admins can create one, and the Admin API is not available for individual accounts.

Some tables need a Claude Enterprise key instead, created by your primary owner in claude.ai organization settings. A key works with one API only, so pick the one that matches the tables you want.

The per-seat activity, cost and token usage tables, and the connector, plugin, skill and summary tables, come from the Claude Enterprise Analytics API. They need a Claude Enterprise key carrying the read:analytics scope.

The group, group membership and custom role tables come from the Claude Enterprise user management API. They need an Admin API key carrying the read:rbac_groups scope for the group tables, or read:members for the custom role tables.

Configuration

OptionTypeRequired
Admin API keypasswordYes

Linking Anthropic to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select Anthropic
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
users

Members of your Anthropic organization.

Full refresh
invites

Pending and historical invitations to join your Anthropic organization.

Full refresh
workspaces

Workspaces in your Anthropic organization (includes archived workspaces).

Full refresh
api_keys

API keys provisioned across your Anthropic organization's workspaces.

Full refresh
workspace_members

Membership rows mapping users to the workspaces they belong to, one row per (workspace, user).

Full refresh
rbac_groups

Groups in your Claude Enterprise organization, the join between members and the custom roles that grant their permissions. Groups are owned by the enterprise as a whole, so this table spans every linked organization.

Full refresh
rbac_group_members

Membership rows mapping users to the Claude Enterprise groups they hold, one row per (group, user). Joins to users on user_id and to rbac_groups on group_id.

Full refresh
rbac_roles

Custom roles defined in your Claude Enterprise organization, the lookup resolving the role IDs carried on rbac_groups. The role catalog is per-organization while groups span the enterprise, so a group can name a role this table does not contain.

Full refresh
rbac_role_permissions

What each custom role grants, one row per (role, action, resource). Anthropic omits rows for features your organization has not enabled. A capability_access_all or capability_access_all_ga action is a blanket grant listed as a single row, so a tally of a role's access has to treat it as covering every product feature it describes rather than only the features named in other rows.

Full refresh
usage_report

Claude Messages API token usage aggregated into daily buckets, broken down by model, workspace, API key, service tier, context window, and inference geo.

Incremental, Full refreshstarting_at
cost_report

Daily cost in USD for your Anthropic organization, broken down by workspace and cost description.

Incremental, Full refreshstarting_at
claude_code_analytics

Claude Code productivity metrics, one row per user per day: sessions, lines of code, commits, pull requests, and tool-action accept/reject counts.

Incremental, Full refreshdate
claude_code_model_breakdown

Per-model token usage and estimated cost for Claude Code, one row per user per day per model.

Incremental, Full refreshdate
analytics_user_activity

Per-seat engagement across Claude products, one row per organization member per UTC day. Metric columns are prefixed by the product surface they measure: chat, claude_code, cowork, design, office (per Office app) and science.

Incremental, Full refreshdate
analytics_user_cost

Cost attributed to a seat user, one row per member per UTC day. Covers only cost that belongs to a seat user; org-wide totals including direct API-key traffic are in cost_report.

Incremental, Full refreshstarting_at
analytics_user_usage

Token usage attributed to a seat user, one row per member per UTC day. Covers only usage that belongs to a seat user; org-wide totals including direct API-key traffic are in usage_report.

Incremental, Full refreshstarting_at
analytics_connector_usage

Connector adoption, one row per connector per UTC day. Connector names are normalized across their sources, so "Atlassian MCP server" and "mcp-atlassian" both appear as "atlassian". Metric columns are prefixed by the product surface they measure: chat, claude_code, cowork and office (per Office app).

Incremental, Full refreshdate
analytics_plugin_usage

Plugin installs and invocations across Cowork and Claude Code, one row per plugin per UTC day. The plugin_name value "third-party" is an aggregate bucket rather than a plugin: it collects activity the reporting client sent no plugin name for.

Incremental, Full refreshdate
analytics_skill_usage

Skill adoption and the spend attributed to each skill, one row per skill per UTC day. A skill counts as used only when it is explicitly activated, so a skill that is merely installed, listed, or read as a plain file is not counted. Metric columns are prefixed by the product surface they measure: chat, claude_code, cowork and office (per Office app).

Incremental, Full refreshdate
analytics_summaries

Organization-wide activity and adoption as Anthropic rolls it up, one row per UTC day. Active-user counts come in three windows: the day itself, and the 7- and 30-day rolling windows ending on it. Per-product columns are omitted while the per-product breakdown is not enabled for your organization.

Incremental, Full refreshstarting_at