Google Analytics · Schema

CustomMetric

A definition for a custom metric.

AnalyticsDataGoogleMetricsReportingWeb AnalyticsMachine-LearningAttribution

Properties

Name Type Description
description string Optional. Description for this custom dimension. Max length of 150 characters.
displayName string Required. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display
measurementUnit string Required. The type for the custom metric's value.
name string Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}
parameterName string Required. Immutable. Tagging name for this custom metric. If this is an event-scoped metric, then this is the event parameter name. May only contain alphanumeric and underscore charactes, starting wit
restrictedMetricType array Optional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit.
scope string Required. Immutable. The scope of this custom metric.
View JSON Schema on GitHub

JSON Schema

admin-api-custom-metric-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/google-analytics/refs/heads/main/json-schema/admin-api-custom-metric-schema.json",
  "title": "CustomMetric",
  "description": "A definition for a custom metric.",
  "type": "object",
  "properties": {
    "description": {
      "description": "Optional. Description for this custom dimension. Max length of 150 characters.",
      "type": "string"
    },
    "displayName": {
      "description": "Required. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.",
      "type": "string"
    },
    "measurementUnit": {
      "description": "Required. The type for the custom metric's value.",
      "enum": [
        "MEASUREMENT_UNIT_UNSPECIFIED",
        "STANDARD",
        "CURRENCY",
        "FEET",
        "METERS",
        "KILOMETERS",
        "MILES",
        "MILLISECONDS",
        "SECONDS",
        "MINUTES",
        "HOURS"
      ],
      "type": "string"
    },
    "name": {
      "description": "Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}",
      "readOnly": true,
      "type": "string"
    },
    "parameterName": {
      "description": "Required. Immutable. Tagging name for this custom metric. If this is an event-scoped metric, then this is the event parameter name. May only contain alphanumeric and underscore charactes, starting with a letter. Max length of 40 characters for event-scoped metrics.",
      "type": "string"
    },
    "restrictedMetricType": {
      "description": "Optional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit.",
      "items": {
        "enum": [
          "RESTRICTED_METRIC_TYPE_UNSPECIFIED",
          "COST_DATA",
          "REVENUE_DATA"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "scope": {
      "description": "Required. Immutable. The scope of this custom metric.",
      "enum": [
        "METRIC_SCOPE_UNSPECIFIED",
        "EVENT"
      ],
      "type": "string"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/admin-api-custom-metric"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.