{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AnalyticsEvent",
  "title": "AnalyticsEvent",
  "type": "object",
  "required": [
    "name",
    "eventVersion",
    "eventTimestamp",
    "eventUuid",
    "installationUuid",
    "sessionUuid"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Custom event name (e.g., \"game_started\", \"level_completed\")"
    },
    "eventVersion": {
      "type": "string",
      "description": "Version of the event schema"
    },
    "eventTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp of when the event occurred"
    },
    "eventUuid": {
      "type": "string",
      "format": "uuid",
      "description": "Unique event identifier for deduplication"
    },
    "installationUuid": {
      "type": "string",
      "format": "uuid",
      "description": "Unique installation identifier"
    },
    "sessionUuid": {
      "type": "string",
      "format": "uuid",
      "description": "Unique session identifier"
    },
    "parameters": {
      "type": "object",
      "description": "Custom event parameters as key-value pairs"
    },
    "userProperties": {
      "type": "object",
      "description": "User-level properties for segmentation"
    },
    "gameStoreVersion": {
      "type": "string"
    },
    "storeType": {
      "type": "string"
    },
    "osVersion": {
      "type": "string"
    },
    "sdkVersion": {
      "type": "string"
    },
    "userId": {
      "type": "string",
      "description": "Unity player ID if authenticated"
    }
  }
}