Skip to content

Commit b3497f0

Browse files
committed
analytics: fix information hierarchy
1 parent ce186a5 commit b3497f0

File tree

3 files changed

+80
-34
lines changed

3 files changed

+80
-34
lines changed

docs/analytics/cloud.mdx renamed to docs/analytics/api.mdx

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1-
# Sourcegraph Cloud Analytics
1+
# Sourcegraph Analytics API
22

3-
The following instructions are for all Sourcegraph Cloud and self-hosted customers who have upgraded to a sufficient version of Sourcegraph (5.9+) and fully enabled usage telemetry.
4-
5-
![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/cloud-analytics.png)
6-
7-
## Enablement instructions
8-
9-
To enable Sourcegraph Analytics:
10-
11-
- Create an account on [Sourcegraph Accounts](https://accounts.sourcegraph.com/), or find the email address associated with your existing account.
12-
- Contact your Sourcegraph Technical Advisor or point of contact (or email us at [email protected] if you don't know your contact), provide them with the email address you used to register above and ask for access to Sourcegraph Analytics.
13-
- They will validate your account and link it to your Sourcegraph Enterprise instance's usage metrics.
14-
- Sign in to [Sourcegraph Analytics](https://analytics.sourcegraph.com).
15-
16-
## Data export
17-
18-
Sourcegraph Analytics also includes a CSV export option with key metrics like the number of searches, chats, autocomplete suggestions, Completion Acceptance Rate (CAR%), and more. The data is split by user, day, client/editor, and programming language, perfect for automating retrieval and analyzing data in ways that make the most sense to your organization.
3+
The Sourcegraph Analytics API is an API that provides programmatic access to your Sourcegraph Analytics data, including usage metrics, user activity, and performance data.
194

205
## Access tokens
216

@@ -120,7 +105,7 @@ curl -X DELETE https://analytics.sourcegraph.com/api/service-access-tokens/$TOKE
120105

121106
## API reference
122107

123-
Sourcegraph Analytics API is a RESTful API that allows access to Sourcegraph Analytics data. To authenticate to the API, follow the instructions for [token creation](#token-creation).
108+
To authenticate to the API, follow the instructions for [token creation](#token-creation).
124109

125110
Export your access token as an environment variable:
126111

docs/analytics/index.mdx

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,41 @@
22

33
Enterprise customers can use Sourcegraph Analytics to get a clear view of usage, engagement, performance, and impact.
44

5-
## Sourcegraph Cloud Analytics
6-
This solution is available to:
5+
Our managed [cloud analytics service](https://analytics.sourcegraph.com) for Cody and Code Search usage data is available for:
6+
77
- [Sourcegraph Cloud](/cloud) customers
8-
- Self-hosted customers that have fully enabled usage telemetry, and that are running a supported version of Sourcegraph (5.9+)
9-
- [Sourcegraph Enterprise Starter](/pricing/plans/enterprise-starter) customers
8+
- Self-hosted customers that have fully enabled usage telemetry and are running a supported version of Sourcegraph (5.9+)
9+
- [Sourcegraph workspaces](https://workspaces.sourcegraph.com)
10+
11+
To get started, follow our [enablement instructions](#enablement-instructions).
12+
13+
Air-gapped customers can refer to [Sourcegraph Air-Gapped Analytics](/analytics/air-gapped).
14+
15+
### Enablement instructions
16+
17+
#### Self-hosted and Cloud
18+
19+
To enable Sourcegraph Analytics for self-hosted or Cloud instances:
20+
21+
- Create an account on [Sourcegraph Accounts](https://accounts.sourcegraph.com/), or find the email address associated with your existing account.
22+
- Contact your Sourcegraph Technical Advisor or point of contact (or email us at [email protected] if you don't know your contact), provide them with the email address you used to register above and ask for access to Sourcegraph Analytics.
23+
- They will validate your account and link it to your Sourcegraph Enterprise instance's usage metrics.
24+
- Sign in to [Sourcegraph Analytics](https://analytics.sourcegraph.com).
1025

11-
[Sourcegraph Cloud](/cloud) customers can use our managed [cloud analytics service](https://analytics.sourcegraph.com) for Cody and Code Search usage data.
12-
Self-hosted customers can also use this service, but they must:
13-
- Upgrade to a supported version of Sourcegraph (5.9+)
14-
- Have fully enabled usage telemetry
15-
- [Enablement instructions](/analytics/cloud#enablement)
26+
#### Sourcegraph workspaces
1627

17-
[Sourcegraph Enterprise Starter](/pricing/plans/enterprise-starter) customers must be a workspace admin to get access to Code Search usage data.
28+
To access Sourcegraph workspaces:
1829

19-
For more details on setting up Sourcegraph Analytics, see our [enablement instructions](/analytics/cloud#enablement)
30+
- Ensure you are an admin of your [Sourcegraph workspace](https://workspaces.sourcegraph.com).
31+
- Sign in to [Sourcegraph Analytics](https://analytics.sourcegraph.com) with the same account you use for your workspace.
2032

21-
![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png)
33+
### Data export and API
2234

23-
## Air-Gapped Analytics
35+
Sourcegraph Analytics includes a CSV export option with key metrics like the number of searches, chats, autocomplete suggestions, Completion Acceptance Rate (CAR%), and more. The data is split by user, day, client/editor, and programming language.
2436

25-
<Callout type="info">Air-Gapped analytics is an upcoming feature currently in development. If you would like to learn more, please get in touch with your Sourcegraph representative.</Callout>
37+
You can export data directly from the Sourcegraph Analytics web interface, or programmatically via the API. For API access and detailed instructions, see our [Analytics API documentation](/analytics/api).
2638

27-
Air-Gapped customers can view usage metrics in a locally deployed analytics service built on Grafana to see Sourcegraph usage data.
39+
![sourcegraph-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png)
2840

2941
## Metrics
3042

src/data/redirects.ts

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6818,7 +6818,56 @@ const redirectsData = [
68186818
permanent: true
68196819
},
68206820

6821-
6821+
{
6822+
source: '/analytics/cloud#access-tokens',
6823+
destination: '/analytics/api#access-tokens',
6824+
permanent: true
6825+
},
6826+
{
6827+
source: '/analytics/cloud#token-management-apis',
6828+
destination: '/analytics/api#token-management-apis',
6829+
permanent: true
6830+
},
6831+
{
6832+
source: '/analytics/cloud#enablement-instructions',
6833+
destination: '/analytics#enablement-instructions',
6834+
permanent: true
6835+
},
6836+
{
6837+
source: '/analytics/cloud#data-export',
6838+
destination: '/analytics#data-export-and-api',
6839+
permanent: true
6840+
},
6841+
{
6842+
source: '/analytics/cloud#token-creation',
6843+
destination: '/analytics/api#token-creation',
6844+
permanent: true
6845+
},
6846+
{
6847+
source: '/analytics/cloud#token-listing',
6848+
destination: '/analytics/api#token-listing',
6849+
permanent: true
6850+
},
6851+
{
6852+
source: '/analytics/cloud#token-revocation',
6853+
destination: '/analytics/api#token-revocation',
6854+
permanent: true
6855+
},
6856+
{
6857+
source: '/analytics/cloud#api-reference',
6858+
destination: '/analytics/api#api-reference',
6859+
permanent: true
6860+
},
6861+
{
6862+
source: '/analytics/cloud#csv-export',
6863+
destination: '/analytics/api#csv-export',
6864+
permanent: true
6865+
},
6866+
{
6867+
source: '/analytics/cloud',
6868+
destination: '/analytics',
6869+
permanent: true
6870+
},
68226871
];
68236872

68246873
const updatedRedirectsData = redirectsData.map(redirect => {

0 commit comments

Comments
 (0)