Skip to content

Conversation

federubinstein
Copy link
Contributor

Updated documentation on how to use Sourcegraph Analytics API. Once PR-207 is merged, the cas cookie will be updated to accounts_session_v2, unifying SAMS user sessions and closing CORE-850

This PR will only be merged once PR-207 is fully tested and merged.

@federubinstein federubinstein requested a review from bobheadxi July 25, 2025 16:00
Copy link

vercel bot commented Jul 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 10:43am


For Sourcegraph Analytics, you can generate an access token for programmatic access. Tokens are long-lived with an optional expiry and have the same permissions to access instance data as the user who created them.

### Getting Started
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding an info callout block saying that on N date, the cookie used got changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Added note!

- Retrieve your session cookie, `cas`, from your browser's developer tools.
- Retrieve your SAMS session cookie, `accounts_session_v2`, from your browser's developer tools.

![Sourcegraph Analytics session cookie](https://storage.googleapis.com/sourcegraph-assets/Docs/analytics-cookie.png)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I will update this image when https://github.com/sourcegraph/cody-analytics/pull/207 is merged, and we use accounts_session_v2 in production (so it says analyitcs.sourcegraph.com as the cookie source instead of localhost)

@unknwon
Copy link
Contributor

unknwon commented Jul 28, 2025

SAMS is an internal term, for external communication we consistently use “Sourcegraph Accounts” and no need to mention SAMS.

@federubinstein
Copy link
Contributor Author

SAMS is an internal term, for external communication we consistently use “Sourcegraph Accounts” and no need to mention SAMS.

Got it, updated!

federubinstein and others added 2 commits July 29, 2025 12:38
Copy link
Contributor

@unknwon unknwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@federubinstein federubinstein merged commit aaf80f2 into main Jul 30, 2025
5 checks passed
@federubinstein federubinstein deleted the update-cody-analytics-cookie-name branch July 30, 2025 15:46
bobheadxi added a commit that referenced this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants