{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CustomMetric",
  "title": "CustomMetric",
  "description": "JSON template for Analytics Custom Metric.",
  "properties": {
    "accountId": {
      "description": "Account ID.",
      "type": "string",
      "example": "123456"
    },
    "active": {
      "description": "Boolean indicating whether the custom metric is active.",
      "type": "boolean",
      "example": true
    },
    "created": {
      "description": "Time the custom metric was created.",
      "format": "date-time",
      "readOnly": true,
      "type": "string",
      "example": "2026-04-17T12:00:00Z"
    },
    "id": {
      "description": "Custom metric ID.",
      "type": "string",
      "example": "123456"
    },
    "index": {
      "description": "Index of the custom metric.",
      "format": "int32",
      "readOnly": true,
      "type": "integer",
      "example": 42
    },
    "kind": {
      "default": "analytics#customMetric",
      "description": "Kind value for a custom metric. Set to \"analytics#customMetric\". It is a read-only field.",
      "readOnly": true,
      "type": "string",
      "example": "example_value"
    },
    "max_value": {
      "description": "Max value of custom metric.",
      "type": "string",
      "example": "example_value"
    },
    "min_value": {
      "description": "Min value of custom metric.",
      "type": "string",
      "example": "example_value"
    },
    "name": {
      "description": "Name of the custom metric.",
      "type": "string",
      "example": "Example Name"
    },
    "parentLink": {
      "description": "Parent link for the custom metric. Points to the property to which the custom metric belongs.",
      "properties": {
        "href": {
          "description": "Link to the property to which the custom metric belongs.",
          "type": "string"
        },
        "type": {
          "default": "analytics#webproperty",
          "description": "Type of the parent link. Set to \"analytics#webproperty\".",
          "type": "string"
        }
      },
      "type": "object"
    },
    "scope": {
      "description": "Scope of the custom metric: HIT or PRODUCT.",
      "type": "string",
      "example": "ACTIVE"
    },
    "selfLink": {
      "description": "Link for the custom metric",
      "readOnly": true,
      "type": "string",
      "example": "example_value"
    },
    "type": {
      "description": "Data type of custom metric.",
      "type": "string",
      "example": "ACTIVE"
    },
    "updated": {
      "description": "Time the custom metric was last modified.",
      "format": "date-time",
      "readOnly": true,
      "type": "string",
      "example": "2026-04-17T12:00:00Z"
    },
    "webPropertyId": {
      "description": "Property ID.",
      "type": "string",
      "example": "123456"
    }
  },
  "type": "object"
}