Google Analytics · Schema

CustomMetric

JSON template for Analytics Custom Metric.

AnalyticsDataGoogleMetricsReportingWeb AnalyticsMachine LearningAttribution

Properties

Name Type Description
accountId string Account ID.
active boolean Boolean indicating whether the custom metric is active.
created string Time the custom metric was created.
id string Custom metric ID.
index integer Index of the custom metric.
kind string Kind value for a custom metric. Set to "analytics#customMetric". It is a read-only field.
max_value string Max value of custom metric.
min_value string Min value of custom metric.
name string Name of the custom metric.
parentLink object Parent link for the custom metric. Points to the property to which the custom metric belongs.
scope string Scope of the custom metric: HIT or PRODUCT.
selfLink string Link for the custom metric
type string Data type of custom metric.
updated string Time the custom metric was last modified.
webPropertyId string Property ID.
View JSON Schema on GitHub

JSON Schema

google-analytics-custommetric-schema.json Raw ↑
{
  "$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"
}