Skip to content

Commit 3402ebc

Browse files
authored
document analytics (#1465)
1 parent 781aced commit 3402ebc

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

docs/hub/_toctree.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@
338338
title: Advanced Compute Options
339339
- local: enterprise-hub-tokens-management
340340
title: Tokens Management
341+
- local: enterprise-hub-analytics
342+
title: Analytics
341343
- local: billing
342344
title: Billing
343345
- local: security
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Analytics
2+
3+
<Tip warning={true}>
4+
This feature is part of the <a href="https://huggingface.co/enterprise" target="_blank">Enterprise Hub</a>.
5+
</Tip>
6+
7+
## Analytics Dashboard
8+
9+
Track all your repository activity with a detailed downloads overview that shows total downloads for all your Models and Datasets. Toggle between "All Time" and "Last Month" views to gain insights into your repository's downloads over different periods.
10+
11+
<div class="flex justify-center">
12+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise-analytics.png" alt="screenshot of the Dataset Viewer on a private dataset owned by an Enterprise Hub organization."/>
13+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/enterprise-analytics-dark.png" alt="screenshot of the Dataset Viewer on a private dataset owned by an Enterprise Hub organization."/>
14+
</div>
15+
16+
### Per-repo breakdown
17+
18+
Explore the metrics of individual repositories with the per-repository drill-down table. Utilize the built-in search feature to quickly locate specific repositories. Each row also features a time-series graph that illustrates the trend of downloads over time.
19+
20+
## Export Analytics as JSON
21+
22+
Download a comprehensive JSON file containing analytics for all your repositories, including model and dataset download activity.
23+
24+
### Response Structure
25+
26+
```json
27+
[
28+
{
29+
"repoType": "model",
30+
"repoName": "huggingface/CodeBERTa-small-v1",
31+
"totalDownloads": 4362460,
32+
"records": [
33+
{
34+
"timestamp": "2021-01-22T00:00:00.000Z",
35+
"downloads": 4
36+
}
37+
// ... daily records
38+
]
39+
},
40+
{
41+
"repoType": "dataset",
42+
"repoName": "huggingface/documentation-images",
43+
"totalDownloads": 2167284,
44+
"records": [
45+
{
46+
"timestamp": "2021-11-27T00:00:00.000Z",
47+
"downloads": 4
48+
}
49+
// ... daily records
50+
]
51+
}
52+
]
53+
```
54+
55+
### Repository Object Structure
56+
57+
Each repository object contains:
58+
59+
- `repoType`: The type of repository (e.g., "model", "dataset")
60+
- `repoName`: Full repository name including organization (e.g., "huggingface/documentation-images")
61+
- `totalDownloads`: Cumulative number of downloads (can be 0 for repositories with no activity)
62+
- `records`: Array of daily download entries (can be empty for repositories with no activity)
63+
64+
### Download History
65+
66+
For repositories with download activity, each record in the `records` array includes:
67+
68+
- `timestamp`: ISO 8601 formatted date (UTC)
69+
- `downloads`: Number of downloads for that day
70+
71+
Records are ordered chronologically and provide a daily granular view of download activity for each repository.

0 commit comments

Comments
 (0)