AI-generated Key Takeaways
- 
          This method checks the compatibility of dimensions and metrics that can be added to a Google Analytics Core report request. 
- 
          Reports fail in Google Analytics if incompatible dimensions and metrics are requested. 
- 
          The response body provides the compatibility status for each dimension and metric requested. 
- 
          The compatibilityFilterparameter can filter the response to show only compatible dimensions and metrics.
- 
          Authorization requires either the https://www.googleapis.com/auth/analytics.readonlyorhttps://www.googleapis.com/auth/analyticsOAuth scope.
- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- Compatibility
- DimensionCompatibility
- MetricCompatibility
- Try it!
This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible.
In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible.
The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.
HTTP request
POST https://analyticsdata.googleapis.com/v1beta/{property=properties/*}:checkCompatibility
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| property | 
 A Google Analytics property identifier whose events are tracked. To learn more, see where to find your Property ID.  Example: properties/1234 | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| { "dimensions": [ { object ( | 
| Fields | |
|---|---|
| dimensions[] | 
 The dimensions in this report.  | 
| metrics[] | 
 The metrics in this report.  | 
| dimension | 
 The filter clause of dimensions.  | 
| metric | 
 The filter clause of metrics.  | 
| compatibility | 
 Filters the dimensions and metrics in the response to just this compatibility. Commonly used as  | 
Response body
The compatibility response with the compatibility of each dimension & metric.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| { "dimensionCompatibilities": [ { object ( | 
| Fields | |
|---|---|
| dimension | 
 The compatibility of each dimension. | 
| metric | 
 The compatibility of each metric. | 
Authorization scopes
Requires one of the following OAuth scopes:
- https://www.googleapis.com/auth/analytics.readonly
- https://www.googleapis.com/auth/analytics
Compatibility
The compatibility types for a single dimension or metric.
| Enums | |
|---|---|
| COMPATIBILITY_UNSPECIFIED | Unspecified compatibility. | 
| COMPATIBLE | The dimension or metric is compatible. This dimension or metric can be successfully added to a report. | 
| INCOMPATIBLE | The dimension or metric is incompatible. This dimension or metric cannot be successfully added to a report. | 
DimensionCompatibility
The compatibility for a single dimension.
| JSON representation | 
|---|
| { "dimensionMetadata": { object ( | 
| Fields | |
|---|---|
| dimension | 
 The dimension metadata contains the API name for this compatibility information. The dimension metadata also contains other helpful information like the UI name and description. | 
| compatibility | 
 The compatibility of this dimension. If the compatibility is COMPATIBLE, this dimension can be successfully added to the report. | 
MetricCompatibility
The compatibility for a single metric.
| JSON representation | 
|---|
| { "metricMetadata": { object ( | 
| Fields | |
|---|---|
| metric | 
 The metric metadata contains the API name for this compatibility information. The metric metadata also contains other helpful information like the UI name and description. | 
| compatibility | 
 The compatibility of this metric. If the compatibility is COMPATIBLE, this metric can be successfully added to the report. |