Track team usage with analytics

Tags

official-docs claude-code-cli

Content

Documentation Index

Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt Use this file to discover all available pages before exploring further.

Track team usage with analytics

View Claude Code usage metrics, track adoption, and measure engineering velocity in the analytics dashboard.

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:

Enable contribution metrics

Contribution metrics are in public beta and available on Claude for Teams and Claude for Enterprise plans. These metrics only cover users within your claude.ai organization. Usage through the Claude Console API or third-party integrations is not included.

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.

Contribution metrics are not available for organizations with Zero Data Retention enabled. The analytics dashboard will show usage metrics only.

A GitHub admin installs the Claude GitHub app on your organization's GitHub account at github.com/apps/claude.

A Claude Owner navigates to claude.ai/admin-settings/claude-code and enables the Claude Code analytics feature.

On the same page, enable the "GitHub analytics" toggle.

Complete the GitHub authentication flow and select which GitHub organizations to include in the analysis.

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

These metrics are deliberately conservative and represent an underestimate of Claude Code's actual impact. Only lines and PRs where there is high confidence in Claude Code's involvement are counted.

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.

Contribution metrics with GitHub integration are not currently available for API customers. The Console dashboard shows usage and spend metrics only.

The Console dashboard displays:

View team insights

The team insights table shows per-user metrics:

Spend figures in the Console dashboard are estimates for analytics purposes. For actual costs, refer to your billing page.