Google 애널리틱스용 MCP 서버를 사용해 보세요.
GitHub에서 설치하고
공지사항에서 자세한 내용을 확인하세요.
Metric
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
보고서의 정량적 측정값입니다. 예를 들어 eventCount
측정항목은 총 이벤트 수입니다. 요청은 최대 10개의 측정항목까지 허용됩니다.
JSON 표현 |
{
"name": string,
"expression": string,
"invisible": boolean
} |
필드 |
name |
string
측정항목의 이름입니다. runReport 및 batchRunReports 과 같은 핵심 보고 메서드에서 지원되는 측정항목 이름 목록은 API 측정항목을 참고하세요. runRealtimeReport 메서드에서 지원되는 측정항목 이름 목록은 실시간 측정항목을 참조하세요. runFunnelReport 메서드에서 지원되는 측정항목 이름 목록은 유입경로 측정항목을 참조하세요. expression 가 지정된 경우 name 는 허용된 문자 집합 내에서 원하는 문자열이 될 수 있습니다. 예를 들어 expression 이 screenPageViews/sessions 이면 측정항목의 이름을 viewsPerSession 로 지정할 수 있습니다. 선택한 측정항목 이름은 정규 표현식 ^[a-zA-Z0-9_]$ 과 일치해야 합니다.
측정항목은 metricFilter , orderBys , 측정항목 expression 의 name 에서 참조합니다.
|
expression |
string
파생된 측정항목의 수학 표현식입니다. 예를 들어 사용자당 이벤트 수는 eventCount/totalUsers 입니다.
|
invisible |
boolean
보고서 응답에 측정항목이 표시되지 않는지 여부를 나타냅니다. 측정항목이 표시되지 않으면 측정항목은 응답에 열을 생성하지 않지만 metricFilter , orderBys 또는 측정항목 expression 에서는 사용할 수 있습니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eMetrics quantify report data, such as the total events with \u003ccode\u003eeventCount\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can request up to 10 metrics in a report.\u003c/p\u003e\n"],["\u003cp\u003eMetrics are defined by \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003eexpression\u003c/code\u003e for calculations, and \u003ccode\u003einvisible\u003c/code\u003e to control visibility.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ename\u003c/code\u003e can be a standard metric or a custom name when \u003ccode\u003eexpression\u003c/code\u003e is used.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eexpression\u003c/code\u003e enables creating calculated metrics like "Event count per user" (\u003ccode\u003eeventCount/totalUsers\u003c/code\u003e).\u003c/p\u003e\n"]]],["This document outlines the structure for defining quantitative measurements (metrics) within a report. Each metric has a `name` (a string that can be custom when using an `expression`), an optional `expression` (a mathematical formula to derive the metric), and an `invisible` boolean, the metric can be excluded from the report's output but used for filtering, ordering, or in other metrics' `expression` . Up to 10 metrics are allowed per request.\n"],null,["# Metric\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nThe quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.\n\n| JSON representation |\n|------------------------------------------------------------------------|\n| ``` { \"name\": string, \"expression\": string, \"invisible\": boolean } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names supported by core reporting methods such as `runReport` and `batchRunReports`. See [Realtime Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) for the list of metric names supported by the `runRealtimeReport` method. See [Funnel Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) for the list of metric names supported by the `runFunnelReport` method. If `expression` is specified, `name` can be any string that you would like within the allowed character set. For example if `expression` is `screenPageViews/sessions`, you could call that metric's name = `viewsPerSession`. Metric names that you choose must match the regular expression `^[a-zA-Z0-9_]$`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`. |\n| `expression` | `string` A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`. |\n| `invisible` | `boolean` Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`. |"]]