Skip to content

[2026-04-16] C-247: Add S2S analytics events API documentation#6

Open
MrJoy wants to merge 2 commits intomainfrom
feat/c-247-server-to-server-api-for-custom-analytics-events
Open

[2026-04-16] C-247: Add S2S analytics events API documentation#6
MrJoy wants to merge 2 commits intomainfrom
feat/c-247-server-to-server-api-for-custom-analytics-events

Conversation

@MrJoy
Copy link
Copy Markdown
Contributor

@MrJoy MrJoy commented Apr 9, 2026

Document the new POST /v2/analytics_events and /v2/analytics_events/batch endpoints for server-to-server custom analytics event ingestion.

  • Single and batch endpoint docs with full parameter descriptions
  • Geo resolution priority documented: ip_address > country_code > last SDK session
  • Success, error (400/404/429) response examples
  • Added to nav.adoc

Human-Claude Interaction Log

Human prompts (VERBATIM):

  1. "I've already updated the Linear issue's status. I've cut a branch in ../server-api-docs, so you can update the docs there." → Claude: Explored server-api-docs repo structure, read existing endpoint docs (player_properties) for conventions, created matching AsciiDoc page and nav entry.

Key decisions made:

  • Human guided: docs go in server-api-docs repo on pre-cut branch
  • Claude discovered: repo uses Antora with AsciiDoc, followed player_properties doc conventions exactly

🤖 Generated with Claude Code

Document the new POST /v2/analytics_events and /v2/analytics_events/batch
endpoints for server-to-server custom analytics event ingestion.

- Single and batch endpoint docs with full parameter descriptions
- Geo resolution priority documented: ip_address > country_code > last SDK session
- Success, error (400/404/429) response examples
- Added to nav.adoc

## Human-Claude Interaction Log

### Human prompts (VERBATIM):
1. "I've already updated the Linear issue's status. I've cut a branch in ../server-api-docs, so you can update the docs there."
   → Claude: Explored server-api-docs repo structure, read existing endpoint docs (player_properties) for conventions, created matching AsciiDoc page and nav entry.

### Key decisions made:
- Human guided: docs go in server-api-docs repo on pre-cut branch
- Claude discovered: repo uses Antora with AsciiDoc, followed player_properties doc conventions exactly

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
@MrJoy MrJoy requested a review from Copilot April 9, 2026 23:15
@MrJoy MrJoy self-assigned this Apr 9, 2026
@MrJoy MrJoy added the documentation Improvements or additions to documentation label Apr 9, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Antora/AsciiDoc documentation for new server-to-server analytics event ingestion endpoints so integrators can send custom events from game servers and understand request/response formats and geo resolution behavior.

Changes:

  • Added a new v2_analytics_events docs page covering single-event and batch ingestion endpoints.
  • Documented required/optional parameters, geo resolution priority, and success/error response examples.
  • Added the new page to the ROOT navigation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
modules/ROOT/pages/other/v2_analytics_events.adoc New documentation page for /v2/analytics_events and /v2/analytics_events/batch endpoints.
modules/ROOT/nav.adoc Adds “Analytics Events” to the documentation navigation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MrJoy MrJoy requested a review from AlexSc April 9, 2026 23:27
@MrJoy MrJoy changed the title Add S2S analytics events API documentation (C-247) [2026-04-16] C-247: Add S2S analytics events API documentation Apr 9, 2026
Copy link
Copy Markdown
Member

@AlexSc AlexSc left a comment

Choose a reason for hiding this comment

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

I put all the review comments on the batch endpoint, but they apply to the non batch endpoint too. Just happened to be where I was when I started taking notes.

…C-247)

- Rename ip_address → client_ip for consistency with v2/identify
- Rename duration → value with corrected description (arbitrary numeric
  value, not time duration — OLAP column reuse)
- Move object_type from required to optional (both endpoints)
- Add "Defaults to 1 if omitted" for event_count, value, sum_of_squares
- Replace batch example with coin sink use case demonstrating value and
  sum_of_squares fields

## Human-Claude Interaction Log

### Human prompts (VERBATIM):
1. "We're going to make some fixes to both this branch of the carrot repo, and a corresponding branch of the server-api-docs repo (feat/c-247-server-to-server-api-for-custom-analytics-events)."
   → Claude: Explored both repos to understand current state

2. "Take a look at PR #6 on the server-api-docs repo.  The discussion there outlines what we need to do."
   → Claude: Read PR comments from AlexSc, identified 6 action items

3. "Mostly.  I'd also like to rename the `duration` parameter to `value` in order to keep the public-facing API from becoming confusing."
   → Claude: Added duration→value rename to the plan, implemented all changes

4. "Looks good!  Please commit your work on both branches.  It looks like for the carrot repo you've made a new branch called claude/epic-ride.  Please merge that into the feat/c-247-server-to-server-api-for-custom-analytics-events branch."
   → Claude: Committing and merging

### Key decisions made:
- Human guided: rename duration→value for public API clarity
- Human guided: merge worktree branch into feature branch
- Claude discovered: object_type had no required validation in controller already

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
@MrJoy MrJoy requested a review from AlexSc April 11, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants