@google-analytics/data 5.2.2 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -61,6 +61,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
61
61
  | create recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js) |
62
62
  | create report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js) |
63
63
  | get audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js) |
64
+ | get metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js) |
64
65
  | get property quotas snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js) |
65
66
  | get recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js) |
66
67
  | get report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js) |
@@ -70,7 +71,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
70
71
  | query audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js) |
71
72
  | query report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js) |
72
73
  | run funnel report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js) |
73
- | sheet export audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js) |
74
+ | run report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js) |
74
75
  | analytics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json) |
75
76
  | batch run pivot reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js) |
76
77
  | batch run reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js) |
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -38,10 +38,7 @@ service AlphaAnalyticsData {
38
38
  option (google.api.default_host) = "analyticsdata.googleapis.com";
39
39
  option (google.api.oauth_scopes) =
40
40
  "https://www.googleapis.com/auth/analytics,"
41
- "https://www.googleapis.com/auth/analytics.readonly,"
42
- "https://www.googleapis.com/auth/drive,"
43
- "https://www.googleapis.com/auth/drive.file,"
44
- "https://www.googleapis.com/auth/spreadsheets";
41
+ "https://www.googleapis.com/auth/analytics.readonly";
45
42
 
46
43
  // Returns a customized funnel report of your Google Analytics event data. The
47
44
  // data returned from the API is as a table with columns for the requested
@@ -131,34 +128,6 @@ service AlphaAnalyticsData {
131
128
  option (google.api.method_signature) = "name";
132
129
  }
133
130
 
134
- // Exports an audience list of users to a Google Sheet. After creating an
135
- // audience, the users are not immediately available for listing. First, a
136
- // request to `CreateAudienceList` is necessary to create an audience list of
137
- // users, and then second, this method is used to export those users in the
138
- // audience list to a Google Sheet.
139
- //
140
- // See [Creating an Audience
141
- // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
142
- // for an introduction to Audience Lists with examples.
143
- //
144
- // Audiences in Google Analytics 4 allow you to segment your users in the ways
145
- // that are important to your business. To learn more, see
146
- // https://support.google.com/analytics/answer/9267572.
147
- //
148
- // This method is introduced at alpha stability with the intention of
149
- // gathering feedback on syntax and capabilities before entering beta. To give
150
- // your feedback on this API, complete the
151
- // [Google Analytics Audience Export API
152
- // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
153
- rpc SheetExportAudienceList(SheetExportAudienceListRequest)
154
- returns (SheetExportAudienceListResponse) {
155
- option (google.api.http) = {
156
- post: "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet"
157
- body: "*"
158
- };
159
- option (google.api.method_signature) = "name";
160
- }
161
-
162
131
  // Gets configuration metadata about a specific audience list. This method
163
132
  // can be used to understand an audience list after it has been created.
164
133
  //
@@ -331,6 +300,37 @@ service AlphaAnalyticsData {
331
300
  };
332
301
  option (google.api.method_signature) = "parent";
333
302
  }
303
+
304
+ // Returns a customized report of your Google Analytics event data. Reports
305
+ // contain statistics derived from data collected by the Google Analytics
306
+ // tracking code. The data returned from the API is as a table with columns
307
+ // for the requested dimensions and metrics. Metrics are individual
308
+ // measurements of user activity on your property, such as active users or
309
+ // event count. Dimensions break down metrics across some common criteria,
310
+ // such as country or event name.
311
+ rpc RunReport(RunReportRequest) returns (RunReportResponse) {
312
+ option (google.api.http) = {
313
+ post: "/v1alpha/{property=properties/*}:runReport"
314
+ body: "*"
315
+ };
316
+ }
317
+
318
+ // Returns metadata for dimensions and metrics available in reporting methods.
319
+ // Used to explore the dimensions and metrics. In this method, a Google
320
+ // Analytics property identifier is specified in the request, and
321
+ // the metadata response includes Custom dimensions and metrics as well as
322
+ // Universal metadata.
323
+ //
324
+ // For example if a custom metric with parameter name `levels_unlocked` is
325
+ // registered to a property, the Metadata response will contain
326
+ // `customEvent:levels_unlocked`. Universal metadata are dimensions and
327
+ // metrics applicable to any property such as `country` and `totalUsers`.
328
+ rpc GetMetadata(GetMetadataRequest) returns (Metadata) {
329
+ option (google.api.http) = {
330
+ get: "/v1alpha/{name=properties/*/metadata}"
331
+ };
332
+ option (google.api.method_signature) = "name";
333
+ }
334
334
  }
335
335
 
336
336
  // A request to create a new recurring audience list.
@@ -789,69 +789,6 @@ message QueryAudienceListResponse {
789
789
  optional int32 row_count = 3;
790
790
  }
791
791
 
792
- // A request to export users in an audience list to a Google Sheet.
793
- message SheetExportAudienceListRequest {
794
- // Required. The name of the audience list to retrieve users from.
795
- // Format: `properties/{property}/audienceLists/{audience_list}`
796
- string name = 1 [
797
- (google.api.field_behavior) = REQUIRED,
798
- (google.api.resource_reference) = {
799
- type: "analyticsdata.googleapis.com/AudienceList"
800
- }
801
- ];
802
-
803
- // Optional. The row count of the start row. The first row is counted as row
804
- // 0.
805
- //
806
- // When paging, the first request does not specify offset; or equivalently,
807
- // sets offset to 0; the first request returns the first `limit` of rows. The
808
- // second request sets offset to the `limit` of the first request; the second
809
- // request returns the second `limit` of rows.
810
- //
811
- // To learn more about this pagination parameter, see
812
- // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
813
- int64 offset = 2 [(google.api.field_behavior) = OPTIONAL];
814
-
815
- // Optional. The number of rows to return. If unspecified, 10,000 rows are
816
- // returned. The API returns a maximum of 250,000 rows per request, no matter
817
- // how many you ask for. `limit` must be positive.
818
- //
819
- // The API can also return fewer rows than the requested `limit`, if there
820
- // aren't as many dimension values as the `limit`.
821
- //
822
- // To learn more about this pagination parameter, see
823
- // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
824
- int64 limit = 3 [(google.api.field_behavior) = OPTIONAL];
825
- }
826
-
827
- // The created Google Sheet with the list of users in an audience list.
828
- message SheetExportAudienceListResponse {
829
- // A uri for you to visit in your browser to view the Google Sheet.
830
- optional string spreadsheet_uri = 1;
831
-
832
- // An ID that identifies the created Google Sheet resource.
833
- optional string spreadsheet_id = 2;
834
-
835
- // The total number of rows in the AudienceList result. `rowCount` is
836
- // independent of the number of rows returned in the response, the `limit`
837
- // request parameter, and the `offset` request parameter. For example if a
838
- // query returns 175 rows and includes `limit` of 50 in the API request, the
839
- // response will contain `rowCount` of 175 but only 50 rows.
840
- //
841
- // To learn more about this pagination parameter, see
842
- // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
843
- optional int32 row_count = 3;
844
-
845
- // Configuration data about AudienceList being exported. Returned to help
846
- // interpret the AudienceList in the Google Sheet of this response.
847
- //
848
- // For example, the AudienceList may have more rows than are present in the
849
- // Google Sheet, and in that case, you may want to send an additional sheet
850
- // export request with a different `offset` value to retrieve the next page of
851
- // rows in an additional Google Sheet.
852
- optional AudienceList audience_list = 4;
853
- }
854
-
855
792
  // Dimension value attributes for the audience user row.
856
793
  message AudienceRow {
857
794
  // Each dimension value attribute for an audience user. One dimension value
@@ -1302,3 +1239,206 @@ message ListReportTasksResponse {
1302
1239
  // If this field is omitted, there are no subsequent pages.
1303
1240
  optional string next_page_token = 2;
1304
1241
  }
1242
+
1243
+ // The request to generate a report.
1244
+ message RunReportRequest {
1245
+ // Required. A Google Analytics property identifier whose events are tracked.
1246
+ // Specified in the URL path and not the body. To learn more, see [where to
1247
+ // find your Property
1248
+ // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
1249
+ // Within a batch request, this property should either be unspecified or
1250
+ // consistent with the batch-level property.
1251
+ //
1252
+ // Example: properties/1234
1253
+ string property = 1 [(google.api.field_behavior) = REQUIRED];
1254
+
1255
+ // Optional. The dimensions requested and displayed.
1256
+ repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL];
1257
+
1258
+ // Optional. The metrics requested and displayed.
1259
+ repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL];
1260
+
1261
+ // Optional. Date ranges of data to read. If multiple date ranges are
1262
+ // requested, each response row will contain a zero based date range index. If
1263
+ // two date ranges overlap, the event data for the overlapping days is
1264
+ // included in the response rows for both date ranges. In a cohort request,
1265
+ // this `dateRanges` must be unspecified.
1266
+ repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL];
1267
+
1268
+ // Optional. Dimension filters let you ask for only specific dimension values
1269
+ // in the report. To learn more, see [Fundamentals of Dimension
1270
+ // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
1271
+ // for examples. Metrics cannot be used in this filter.
1272
+ FilterExpression dimension_filter = 5
1273
+ [(google.api.field_behavior) = OPTIONAL];
1274
+
1275
+ // Optional. The filter clause of metrics. Applied after aggregating the
1276
+ // report's rows, similar to SQL having-clause. Dimensions cannot be used in
1277
+ // this filter.
1278
+ FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL];
1279
+
1280
+ // Optional. The row count of the start row. The first row is counted as row
1281
+ // 0.
1282
+ //
1283
+ // When paging, the first request does not specify offset; or equivalently,
1284
+ // sets offset to 0; the first request returns the first `limit` of rows. The
1285
+ // second request sets offset to the `limit` of the first request; the second
1286
+ // request returns the second `limit` of rows.
1287
+ //
1288
+ // To learn more about this pagination parameter, see
1289
+ // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1290
+ int64 offset = 7 [(google.api.field_behavior) = OPTIONAL];
1291
+
1292
+ // Optional. The maximum number of rows to return. If unspecified, 10,000 rows
1293
+ // are returned. The API returns a maximum of 250,000 rows per request, no
1294
+ // matter how many you ask for. `limit` must be positive.
1295
+ //
1296
+ // The API can also return fewer rows than the requested `limit`, if there
1297
+ // aren't as many dimension values as the `limit`. For instance, there are
1298
+ // fewer than 300 possible values for the dimension `country`, so when
1299
+ // reporting on only `country`, you can't get more than 300 rows, even if you
1300
+ // set `limit` to a higher value.
1301
+ //
1302
+ // To learn more about this pagination parameter, see
1303
+ // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1304
+ int64 limit = 8 [(google.api.field_behavior) = OPTIONAL];
1305
+
1306
+ // Optional. Aggregation of metrics. Aggregated metric values will be shown in
1307
+ // rows where the dimension_values are set to "RESERVED_(MetricAggregation)".
1308
+ // Aggregates including both comparisons and multiple date ranges will
1309
+ // be aggregated based on the date ranges.
1310
+ repeated MetricAggregation metric_aggregations = 9
1311
+ [(google.api.field_behavior) = OPTIONAL];
1312
+
1313
+ // Optional. Specifies how rows are ordered in the response.
1314
+ // Requests including both comparisons and multiple date ranges will
1315
+ // have order bys applied on the comparisons.
1316
+ repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL];
1317
+
1318
+ // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY".
1319
+ // If the field is empty, the report uses the property's default currency.
1320
+ string currency_code = 11 [(google.api.field_behavior) = OPTIONAL];
1321
+
1322
+ // Optional. Cohort group associated with this request. If there is a cohort
1323
+ // group in the request the 'cohort' dimension must be present.
1324
+ CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL];
1325
+
1326
+ // Optional. If false or unspecified, each row with all metrics equal to 0
1327
+ // will not be returned. If true, these rows will be returned if they are not
1328
+ // separately removed by a filter.
1329
+ //
1330
+ // Regardless of this `keep_empty_rows` setting, only data recorded by the
1331
+ // Google Analytics property can be displayed in a report.
1332
+ //
1333
+ // For example if a property never logs a `purchase` event, then a query for
1334
+ // the `eventName` dimension and `eventCount` metric will not have a row
1335
+ // eventName: "purchase" and eventCount: 0.
1336
+ bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL];
1337
+
1338
+ // Optional. Toggles whether to return the current state of this Google
1339
+ // Analytics property's quota. Quota is returned in
1340
+ // [PropertyQuota](#PropertyQuota).
1341
+ bool return_property_quota = 14 [(google.api.field_behavior) = OPTIONAL];
1342
+
1343
+ // Optional. The configuration of comparisons requested and displayed. The
1344
+ // request only requires a comparisons field in order to receive a comparison
1345
+ // column in the response.
1346
+ repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL];
1347
+
1348
+ // Optional. Controls conversion reporting. This field is optional. If this
1349
+ // field is set or any conversion metrics are requested, the report will be a
1350
+ // conversion report.
1351
+ ConversionSpec conversion_spec = 16 [(google.api.field_behavior) = OPTIONAL];
1352
+ }
1353
+
1354
+ // The response report table corresponding to a request.
1355
+ message RunReportResponse {
1356
+ // Describes dimension columns. The number of DimensionHeaders and ordering of
1357
+ // DimensionHeaders matches the dimensions present in rows.
1358
+ repeated DimensionHeader dimension_headers = 1;
1359
+
1360
+ // Describes metric columns. The number of MetricHeaders and ordering of
1361
+ // MetricHeaders matches the metrics present in rows.
1362
+ repeated MetricHeader metric_headers = 2;
1363
+
1364
+ // Rows of dimension value combinations and metric values in the report.
1365
+ repeated Row rows = 3;
1366
+
1367
+ // If requested, the totaled values of metrics.
1368
+ repeated Row totals = 4;
1369
+
1370
+ // If requested, the maximum values of metrics.
1371
+ repeated Row maximums = 5;
1372
+
1373
+ // If requested, the minimum values of metrics.
1374
+ repeated Row minimums = 6;
1375
+
1376
+ // The total number of rows in the query result, regardless of the number of
1377
+ // rows returned in the response. For example if a query returns 175 rows and
1378
+ // includes limit = 50 in the API request, the response will contain row_count
1379
+ // = 175 but only 50 rows.
1380
+ //
1381
+ // To learn more about this pagination parameter, see
1382
+ // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1383
+ int32 row_count = 7;
1384
+
1385
+ // Metadata for the report.
1386
+ ResponseMetaData metadata = 8;
1387
+
1388
+ // This Analytics Property's quota state including this request.
1389
+ PropertyQuota property_quota = 9;
1390
+
1391
+ // Identifies what kind of resource this message is. This `kind` is always the
1392
+ // fixed string "analyticsData#runReport". Useful to distinguish between
1393
+ // response types in JSON.
1394
+ string kind = 10;
1395
+
1396
+ // A token, which can be sent as `page_token` to retrieve the next page.
1397
+ // If this field is omitted, there are no subsequent pages.
1398
+ optional string next_page_token = 11;
1399
+ }
1400
+
1401
+ // Request for a property's dimension and metric metadata.
1402
+ message GetMetadataRequest {
1403
+ // Required. The resource name of the metadata to retrieve. This name field is
1404
+ // specified in the URL path and not URL parameters. Property is a numeric
1405
+ // Google Analytics property identifier. To learn more, see [where to find
1406
+ // your Property
1407
+ // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
1408
+ //
1409
+ // Example: properties/1234/metadata
1410
+ //
1411
+ // Set the Property ID to 0 for dimensions and metrics common to all
1412
+ // properties. In this special mode, this method will not return custom
1413
+ // dimensions and metrics.
1414
+ string name = 1 [
1415
+ (google.api.field_behavior) = REQUIRED,
1416
+ (google.api.resource_reference) = {
1417
+ type: "analyticsdata.googleapis.com/Metadata"
1418
+ }
1419
+ ];
1420
+ }
1421
+
1422
+ // The dimensions, metrics and comparisons currently accepted in reporting
1423
+ // methods.
1424
+ message Metadata {
1425
+ option (google.api.resource) = {
1426
+ type: "analyticsdata.googleapis.com/Metadata"
1427
+ pattern: "properties/{property}/metadata"
1428
+ };
1429
+
1430
+ // Resource name of this metadata.
1431
+ string name = 3;
1432
+
1433
+ // The dimension descriptions.
1434
+ repeated DimensionMetadata dimensions = 1;
1435
+
1436
+ // The metric descriptions.
1437
+ repeated MetricMetadata metrics = 2;
1438
+
1439
+ // The comparison descriptions.
1440
+ repeated ComparisonMetadata comparisons = 4;
1441
+
1442
+ // The conversion descriptions.
1443
+ repeated ConversionMetadata conversions = 5;
1444
+ }