SpyBara
Go Premium

Documentation 2026-01-28 15:06 UTC to 2026-01-29 21:03 UTC

1 file changed +172 −47. View all changes and history on the product overview
2026
Sat 31 03:42 Fri 30 18:07 Thu 29 21:03 Wed 28 15:06 Tue 27 21:01 Mon 26 21:03 Sun 25 03:34 Sat 24 03:29 Fri 23 21:01 Thu 22 21:03 Wed 21 21:05 Tue 20 21:03 Mon 19 21:01 Fri 16 21:01 Wed 14 06:02 Mon 12 21:02 Sun 11 18:02 Sat 10 21:01 Fri 9 21:01 Thu 8 21:02 Wed 7 21:01 Tue 6 21:01 Sat 3 18:02

analytics.md +172 −47

Details

2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt

3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.

4 4 

5# Analytics5# Track team usage with analytics

6 6 

7> View detailed usage insights and productivity metrics for your organization's Claude Code deployment.7> View Claude Code usage metrics, track adoption, and measure engineering velocity in the analytics dashboard.

8 8 

9Claude Code provides an analytics dashboard that helps organizations understand developer usage patterns, track productivity metrics, and optimize their Claude Code adoption.9Claude 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:

10 10 

11<Note>11| Plan | Dashboard URL | Includes | Read more |

12 Analytics are currently available only for organizations using Claude Code with the Claude API through the Claude Console.12| ----------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------- |

13</Note>13| Claude for Teams / Enterprise | [claude.ai/analytics/claude-code](https://claude.ai/analytics/claude-code) | Usage metrics, contribution metrics with GitHub integration, leaderboard, data export | [Details](#access-analytics-for-teams-and-enterprise) |

14| API (Claude Console) | [platform.claude.com/claude-code](https://platform.claude.com/claude-code) | Usage metrics, spend tracking, team insights | [Details](#access-analytics-for-api-customers) |

14 15 

15## Access analytics16## Access analytics for Teams and Enterprise

16 17 

17Navigate to the analytics dashboard at [console.anthropic.com/claude-code](https://console.anthropic.com/claude-code).18Navigate to [claude.ai/analytics/claude-code](https://claude.ai/analytics/claude-code). Admins and Owners can view the dashboard.

18 19 

19### Required roles20The Teams and Enterprise dashboard includes:

20 21 

21* **Primary Owner**22* **Usage metrics**: lines of code accepted, suggestion accept rate, daily active users and sessions

22* **Owner**23* **Contribution metrics**: PRs and lines of code shipped with Claude Code assistance, with [GitHub integration](#enable-contribution-metrics)

23* **Billing**24* **Leaderboard**: top contributors ranked by Claude Code usage

24* **Admin**25* **Data export**: download contribution data as CSV for custom reporting

25* **Developer**26 

27### Enable contribution metrics

26 28 

27<Note>29<Note>

28 Users with **User**, **Claude Code User** or **Membership Admin** roles cannot access analytics.30 Contribution metrics are in public beta and available on Claude for Teams and Claude for Enterprise plans.

29</Note>31</Note>

30 32 

31## Available metrics33Usage 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.

34 

35You need the Owner role to configure analytics settings. A GitHub admin must install the GitHub app.

36 

37<Steps>

38 <Step title="Install the GitHub app">

39 A GitHub admin installs the Claude GitHub app on your organization's GitHub account at [github.com/apps/claude](https://github.com/apps/claude).

40 </Step>

41 

42 <Step title="Enable Claude Code analytics">

43 A Claude Owner navigates to [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code) and enables the Claude Code analytics feature.

44 </Step>

45 

46 <Step title="Enable GitHub analytics">

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

48 </Step>

49 

50 <Step title="Authenticate with GitHub">

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

52 </Step>

53</Steps>

54 

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

56 

57* **"GitHub app required"**: install the GitHub app to view contribution metrics

58* **"Data processing in progress"**: check back in a few days and confirm the GitHub app is installed if data doesn't appear

59 

60Contribution metrics support GitHub Cloud and GitHub Enterprise Server.

61 

62### Review summary metrics

63 

64The dashboard displays these summary metrics at the top:

65 

66* **PRs with CC**: total count of merged pull requests that contain at least one line of code written with Claude Code

67* **Lines of code with CC**: total lines of code across all merged PRs that were written with Claude Code assistance. Only "effective lines" are counted: lines with more than 3 characters after normalization, excluding empty lines and lines with only brackets or trivial punctuation.

68* **PRs with Claude Code (%)**: percentage of all merged PRs that contain Claude Code-assisted code

69* **Suggestion accept rate**: percentage of times users accept Claude Code's code editing suggestions, including Edit, Write, and NotebookEdit tool usage

70* **Lines of code accepted**: total lines of code written by Claude Code that users have accepted in their sessions. This excludes rejected suggestions and does not track subsequent deletions.

71 

72### Explore the charts

73 

74The dashboard includes several charts to visualize trends over time.

75 

76#### Track adoption

77 

78The Adoption chart shows daily usage trends:

79 

80* **users**: daily active users

81* **sessions**: number of active Claude Code sessions per day

82 

83#### Measure PRs per user

84 

85This chart displays individual developer activity over time:

86 

87* **PRs per user**: total number of PRs merged per day divided by daily active users

88* **users**: daily active users

89 

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

91 

92#### View pull requests breakdown

93 

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

32 95 

33### Lines of code accepted96* **PRs with CC**: pull requests containing Claude Code-assisted code

97* **PRs without CC**: pull requests without Claude Code-assisted code

34 98 

35Total lines of code written by Claude Code that users have accepted in their sessions.99Toggle to **Lines of code** view to see the same breakdown by lines of code rather than PR count.

36 100 

37* Excludes rejected code suggestions101#### Find top contributors

38* Doesn't track subsequent deletions

39 102 

40### Suggestion accept rate103The Leaderboard shows the top 10 users ranked by contribution volume. Toggle between:

41 104 

42Percentage of times users accept code editing tool usage, including:105* **Pull requests**: shows PRs with Claude Code vs All PRs for each user

106* **Lines of code**: shows lines with Claude Code vs All lines for each user

43 107 

44* Edit108Click **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.

45* Write

46* NotebookEdit

47 109 

48### Activity110### PR attribution

49 111 

50**users**: Number of active users in a given day (number on left Y-axis)112When 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.

51 113 

52**sessions**: Number of active sessions in a given day (number on right Y-axis)114#### Tagging criteria

53 115 

54### Spend116PRs 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.

55 117 

56**users**: Number of active users in a given day (number on left Y-axis)118#### Attribution process

57 119 

58**spend**: Total dollars spent in a given day (number on right Y-axis)120When a pull request is merged:

59 121 

60### Team insights1221. Added lines are extracted from the PR diff

1232. Claude Code sessions that edited matching files within a time window are identified

1243. PR lines are matched against Claude Code output using multiple strategies

1254. Metrics are calculated for AI-assisted lines and total lines

61 126 

62**Members**: All users who have authenticated to Claude Code127Before comparison, lines are normalized: whitespace is trimmed, multiple spaces are collapsed, quotes are standardized, and text is converted to lowercase.

63 128 

64* API key users are displayed by **API key identifier**129Merged pull requests containing Claude Code-assisted lines are labeled as `claude-code-assisted` in GitHub.

65* OAuth users are displayed by **email address**

66 130 

67**Spend this month:** Per-user total spend for the current month.131#### Time window

68 132 

69**Lines this month:** Per-user total of accepted code lines for the current month.133Sessions from 21 days before to 2 days after the PR merge date are considered for attribution matching.

70 134 

71## Using analytics effectively135#### Excluded files

72 136 

73### Monitor adoption137Certain files are automatically excluded from analysis because they are auto-generated:

74 138 

75Track team member status to identify:139* Lock files: package-lock.json, yarn.lock, Cargo.lock, and similar

140* Generated code: Protobuf outputs, build artifacts, minified files

141* Build directories: dist/, build/, node\_modules/, target/

142* Test fixtures: snapshots, cassettes, mock data

143* Lines over 1,000 characters, which are likely minified or generated

144 

145#### Attribution notes

146 

147Keep these additional details in mind when interpreting attribution data:

148 

149* Code substantially rewritten by developers, with more than 20% difference, is not attributed to Claude Code

150* Sessions outside the 21-day window are not considered

151* The algorithm does not consider the PR source or destination branch when performing attribution

152 

153### Get the most from analytics

154 

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

156 

157#### Monitor adoption

158 

159Track the Adoption chart and user counts to identify:

76 160 

77* Active users who can share best practices161* Active users who can share best practices

78* Overall adoption trends across your organization162* Overall adoption trends across your organization

163* Dips in usage that may indicate friction or issues

164 

165#### Measure ROI

166 

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

168 

169* Track changes in PRs per user over time as adoption increases

170* Compare PRs and lines of code shipped with vs. without Claude Code

171* Use alongside [DORA metrics](https://dora.dev/), sprint velocity, or other engineering KPIs to understand changes from adopting Claude Code

172 

173#### Identify power users

174 

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

176 

177* Share prompting techniques and workflows with the team

178* Provide feedback on what's working well

179* Help onboard new users

79 180 

80### Measure productivity181#### Access data programmatically

81 182 

82Tool acceptance rates and code metrics help you:183To query this data through GitHub, search for PRs labeled with `claude-code-assisted`.

83 184 

84* Understand developer satisfaction with Claude Code suggestions185## Access analytics for API customers

85* Track code generation effectiveness186 

86* Identify opportunities for training or process improvements187API customers using the Claude Console can access analytics at [platform.claude.com/claude-code](https://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.

188 

189<Note>

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

191</Note>

192 

193The Console dashboard displays:

194 

195* **Lines of code accepted**: total lines of code written by Claude Code that users have accepted in their sessions. This excludes rejected suggestions and does not track subsequent deletions.

196* **Suggestion accept rate**: percentage of times users accept code editing tool usage, including Edit, Write, and NotebookEdit tools.

197* **Activity**: daily active users and sessions shown on a chart.

198* **Spend**: daily API costs in dollars alongside user count.

199 

200### View team insights

201 

202The team insights table shows per-user metrics:

203 

204* **Members**: all users who have authenticated to Claude Code. API key users display by key identifier, OAuth users display by email address.

205* **Spend this month**: per-user total API costs for the current month.

206* **Lines this month**: per-user total of accepted code lines for the current month.

207 

208<Note>

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

210</Note>

87 211 

88## Related resources212## Related resources

89 213 

90* [Monitoring usage with OpenTelemetry](/en/monitoring-usage) for custom metrics and alerting214* [Monitoring with OpenTelemetry](/en/monitoring-usage): export real-time metrics and events to your observability stack

91* [Identity and access management](/en/iam) for role configuration215* [Manage costs effectively](/en/costs): set spend limits and optimize token usage

216* [Identity and access management](/en/iam): configure roles and permissions