Track team usage with analytics - Claude Code Docs (original) (raw)

Claude Code provides analytics dashboards to help organizations understand developer usage patterns, track contribution metrics, and measure how Claude Code impacts engineering velocity. Access the dashboard for your plan:

Plan Dashboard URL Includes Read more
Claude for Teams / Enterprise claude.ai/analytics/claude-code Usage metrics, contribution metrics with GitHub integration, leaderboard, data export Details
API (Claude Console) platform.claude.com/claude-code Usage metrics, spend tracking, team insights Details

Access analytics for Team and Enterprise

Navigate to claude.ai/analytics/claude-code. Admins and Owners can view the dashboard. The Team and Enterprise dashboard includes:

For per-user token counts and cost estimates, configure OpenTelemetry export.

Enable contribution metrics

Usage and adoption data is available for all Claude for Teams and Claude for Enterprise accounts. Contribution metrics require additional setup to connect your GitHub organization. You need the Owner role to configure analytics settings. A GitHub admin must install the GitHub app.

Data typically appears within 24 hours after enabling, with daily updates. If no data appears, you may see one of these messages:

Contribution metrics support GitHub Cloud and GitHub Enterprise Server.

Review summary metrics

The dashboard displays these summary metrics at the top:

Explore the charts

The dashboard includes several charts to visualize trends over time.

Track adoption

The Adoption chart shows daily usage trends:

Measure PRs per user

This chart displays individual developer activity over time:

Use this to understand how individual productivity changes as Claude Code adoption increases.

View pull requests breakdown

The Pull requests chart shows a daily breakdown of merged PRs:

Toggle to Lines of code view to see the same breakdown by lines of code rather than PR count.

Find top contributors

The Leaderboard shows the top 10 users ranked by contribution volume. Toggle between:

Click Export all users to download complete contribution data for all users as a CSV file. The export includes all users, not just the top 10 displayed.

PR attribution

When contribution metrics are enabled, Claude Code analyzes merged pull requests to determine which code was written with Claude Code assistance. This is done by matching Claude Code session activity against the code in each PR.

Tagging criteria

PRs are tagged as “with Claude Code” if they contain at least one line of code written during a Claude Code session. The system uses conservative matching: only code where there is high confidence in Claude Code’s involvement is counted as assisted.

Attribution process

When a pull request is merged:

  1. Added lines are extracted from the PR diff
  2. Claude Code sessions that edited matching files within a time window are identified
  3. PR lines are matched against Claude Code output using multiple strategies
  4. Metrics are calculated for AI-assisted lines and total lines

Before comparison, lines are normalized: whitespace is trimmed, multiple spaces are collapsed, quotes are standardized, and text is converted to lowercase. Merged pull requests containing Claude Code-assisted lines are labeled as claude-code-assisted in GitHub.

Time window

Sessions from 21 days before to 2 days after the PR merge date are considered for attribution matching.

Excluded files

Certain files are automatically excluded from analysis because they are auto-generated:

Attribution notes

Keep these additional details in mind when interpreting attribution data:

Get the most from analytics

Use contribution metrics to demonstrate ROI, identify adoption patterns, and find team members who can help others get started.

Monitor adoption

Track the Adoption chart and user counts to identify:

Measure ROI

Contribution metrics help answer “Is this tool worth the investment?” with data from your own codebase:

Identify power users

The Leaderboard helps you find team members with high Claude Code adoption who can:

Access data programmatically

To query this data through GitHub, search for PRs labeled with claude-code-assisted.

Access analytics for API customers

API customers using the Claude Console can access analytics at platform.claude.com/claude-code. You need the UsageView permission to access the dashboard, which is granted to Developer, Billing, Admin, Owner, and Primary Owner roles.

The Console dashboard displays:

View team insights

The team insights table shows per-user metrics: