@@ -104,6 +104,71 @@ service BetaAnalyticsData {
104104 body : "*"
105105 };
106106 }
107+
108+ // This compatibility method lists dimensions and metrics that can be added to
109+ // a report request and maintain compatibility. This method fails if the
110+ // request's dimensions and metrics are incompatible.
111+ //
112+ // In Google Analytics, reports fail if they request incompatible dimensions
113+ // and/or metrics; in that case, you will need to remove dimensions and/or
114+ // metrics from the incompatible report until the report is compatible.
115+ //
116+ // The Realtime and Core reports have different compatibility rules. This
117+ // method checks compatibility for Core reports.
118+ rpc CheckCompatibility (CheckCompatibilityRequest ) returns (CheckCompatibilityResponse ) {
119+ option (google.api.http ) = {
120+ post : "/v1beta/{property=properties/*}:checkCompatibility"
121+ body : "*"
122+ };
123+ }
124+ }
125+
126+ // The request for compatibility information for a report's dimensions and
127+ // metrics. Check compatibility provides a preview of the compatibility of a
128+ // report; fields shared with the `runReport` request should be the same values
129+ // as in your `runReport` request.
130+ message CheckCompatibilityRequest {
131+ // A Google Analytics GA4 property identifier whose events are tracked. To
132+ // learn more, see [where to find your Property
133+ // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
134+ // `property` should be the same value as in your `runReport` request.
135+ //
136+ // Example: properties/1234
137+ //
138+ // Set the Property ID to 0 for compatibility checking on dimensions and
139+ // metrics common to all properties. In this special mode, this method will
140+ // not return custom dimensions and metrics.
141+ string property = 1 ;
142+
143+ // The dimensions in this report. `dimensions` should be the same value as in
144+ // your `runReport` request.
145+ repeated Dimension dimensions = 2 ;
146+
147+ // The metrics in this report. `metrics` should be the same value as in your
148+ // `runReport` request.
149+ repeated Metric metrics = 3 ;
150+
151+ // The filter clause of dimensions. `dimensionFilter` should be the same value
152+ // as in your `runReport` request.
153+ FilterExpression dimension_filter = 4 ;
154+
155+ // The filter clause of metrics. `metricFilter` should be the same value as in
156+ // your `runReport` request
157+ FilterExpression metric_filter = 5 ;
158+
159+ // Filters the dimensions and metrics in the response to just this
160+ // compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
161+ // to only return compatible dimensions & metrics.
162+ Compatibility compatibility_filter = 6 ;
163+ }
164+
165+ // The compatibility response with the compatibility of each dimension & metric.
166+ message CheckCompatibilityResponse {
167+ // The compatibility of each dimension.
168+ repeated DimensionCompatibility dimension_compatibilities = 1 ;
169+
170+ // The compatibility of each metric.
171+ repeated MetricCompatibility metric_compatibilities = 2 ;
107172}
108173
109174// The dimensions and metrics currently accepted in reporting methods.
@@ -148,13 +213,14 @@ message RunReportRequest {
148213 // must be unspecified.
149214 repeated DateRange date_ranges = 4 ;
150215
151- // The filter clause of dimensions. Dimensions must be requested to be used in
152- // this filter. Metrics cannot be used in this filter.
216+ // Dimension filters allow you to ask for only specific dimension values in
217+ // the report. To learn more, see [Fundamentals of Dimension
218+ // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
219+ // for examples. Metrics cannot be used in this filter.
153220 FilterExpression dimension_filter = 5 ;
154221
155222 // The filter clause of metrics. Applied at post aggregation phase, similar to
156- // SQL having-clause. Metrics must be requested to be used in this filter.
157- // Dimensions cannot be used in this filter.
223+ // SQL having-clause. Dimensions cannot be used in this filter.
158224 FilterExpression metric_filter = 6 ;
159225
160226 // The row count of the start row. The first row is counted as row 0.
0 commit comments