@google-analytics/data 2.7.0 → 3.0.2
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/CHANGELOG.md +49 -0
- package/README.md +40 -19
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +107 -415
- package/build/protos/google/analytics/data/v1alpha/data.proto +888 -448
- package/build/protos/google/analytics/data/v1beta/data.proto +89 -6
- package/build/protos/protos.d.ts +12012 -9704
- package/build/protos/protos.js +34848 -29013
- package/build/protos/protos.json +3581 -3302
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +102 -41
- package/build/src/v1alpha/alpha_analytics_data_client.js +26 -390
- package/build/src/v1alpha/alpha_analytics_data_client.js.map +1 -1
- package/build/src/v1alpha/alpha_analytics_data_client_config.json +1 -38
- package/build/src/v1alpha/index.js +2 -1
- package/build/src/v1alpha/index.js.map +1 -1
- package/build/src/v1beta/beta_analytics_data_client.d.ts +409 -16
- package/build/src/v1beta/beta_analytics_data_client.js +29 -381
- package/build/src/v1beta/beta_analytics_data_client.js.map +1 -1
- package/build/src/v1beta/index.js +2 -1
- package/build/src/v1beta/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as gax from 'google-gax';
|
|
2
|
-
import { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
|
|
1
|
+
import type * as gax from 'google-gax';
|
|
2
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
|
|
3
3
|
import * as protos from '../../protos/protos';
|
|
4
4
|
/**
|
|
5
5
|
* Google Analytics reporting data service.
|
|
@@ -31,7 +31,7 @@ export declare class BetaAnalyticsDataClient {
|
|
|
31
31
|
*
|
|
32
32
|
* @param {object} [options] - The configuration object.
|
|
33
33
|
* The options accepted by the constructor are described in detail
|
|
34
|
-
* in [this document](https://github.com/googleapis/gax-nodejs/blob/
|
|
34
|
+
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
|
|
35
35
|
* The common options are:
|
|
36
36
|
* @param {object} [options.credentials] - Credentials object.
|
|
37
37
|
* @param {string} [options.credentials.client_email]
|
|
@@ -54,13 +54,19 @@ export declare class BetaAnalyticsDataClient {
|
|
|
54
54
|
* API remote host.
|
|
55
55
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
56
56
|
* Follows the structure of {@link gapicConfig}.
|
|
57
|
-
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
57
|
+
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
|
|
58
|
+
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
59
|
+
* For more information, please check the
|
|
60
|
+
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
61
|
+
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
62
|
+
* need to avoid loading the default gRPC version and want to use the fallback
|
|
63
|
+
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
64
|
+
* ```
|
|
65
|
+
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
66
|
+
* const client = new BetaAnalyticsDataClient({fallback: 'rest'}, gax);
|
|
67
|
+
* ```
|
|
62
68
|
*/
|
|
63
|
-
constructor(opts?: ClientOptions);
|
|
69
|
+
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
64
70
|
/**
|
|
65
71
|
* Initialize the client.
|
|
66
72
|
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
@@ -99,25 +105,412 @@ export declare class BetaAnalyticsDataClient {
|
|
|
99
105
|
static get scopes(): string[];
|
|
100
106
|
getProjectId(): Promise<string>;
|
|
101
107
|
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
102
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Returns a customized report of your Google Analytics event data. Reports
|
|
110
|
+
* contain statistics derived from data collected by the Google Analytics
|
|
111
|
+
* tracking code. The data returned from the API is as a table with columns
|
|
112
|
+
* for the requested dimensions and metrics. Metrics are individual
|
|
113
|
+
* measurements of user activity on your property, such as active users or
|
|
114
|
+
* event count. Dimensions break down metrics across some common criteria,
|
|
115
|
+
* such as country or event name.
|
|
116
|
+
*
|
|
117
|
+
* @param {Object} request
|
|
118
|
+
* The request object that will be sent.
|
|
119
|
+
* @param {string} request.property
|
|
120
|
+
* A Google Analytics GA4 property identifier whose events are tracked.
|
|
121
|
+
* Specified in the URL path and not the body. To learn more, see [where to
|
|
122
|
+
* find your Property
|
|
123
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
124
|
+
* Within a batch request, this property should either be unspecified or
|
|
125
|
+
* consistent with the batch-level property.
|
|
126
|
+
*
|
|
127
|
+
* Example: properties/1234
|
|
128
|
+
* @param {number[]} request.dimensions
|
|
129
|
+
* The dimensions requested and displayed.
|
|
130
|
+
* @param {number[]} request.metrics
|
|
131
|
+
* The metrics requested and displayed.
|
|
132
|
+
* @param {number[]} request.dateRanges
|
|
133
|
+
* Date ranges of data to read. If multiple date ranges are requested, each
|
|
134
|
+
* response row will contain a zero based date range index. If two date
|
|
135
|
+
* ranges overlap, the event data for the overlapping days is included in the
|
|
136
|
+
* response rows for both date ranges. In a cohort request, this `dateRanges`
|
|
137
|
+
* must be unspecified.
|
|
138
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter
|
|
139
|
+
* Dimension filters allow you to ask for only specific dimension values in
|
|
140
|
+
* the report. To learn more, see [Fundamentals of Dimension
|
|
141
|
+
* Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
|
|
142
|
+
* for examples. Metrics cannot be used in this filter.
|
|
143
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter
|
|
144
|
+
* The filter clause of metrics. Applied at post aggregation phase, similar to
|
|
145
|
+
* SQL having-clause. Dimensions cannot be used in this filter.
|
|
146
|
+
* @param {number} request.offset
|
|
147
|
+
* The row count of the start row. The first row is counted as row 0.
|
|
148
|
+
*
|
|
149
|
+
* When paging, the first request does not specify offset; or equivalently,
|
|
150
|
+
* sets offset to 0; the first request returns the first `limit` of rows. The
|
|
151
|
+
* second request sets offset to the `limit` of the first request; the second
|
|
152
|
+
* request returns the second `limit` of rows.
|
|
153
|
+
*
|
|
154
|
+
* To learn more about this pagination parameter, see
|
|
155
|
+
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
|
156
|
+
* @param {number} request.limit
|
|
157
|
+
* The number of rows to return. If unspecified, 10,000 rows are returned. The
|
|
158
|
+
* API returns a maximum of 100,000 rows per request, no matter how many you
|
|
159
|
+
* ask for. `limit` must be positive.
|
|
160
|
+
*
|
|
161
|
+
* The API can also return fewer rows than the requested `limit`, if there
|
|
162
|
+
* aren't as many dimension values as the `limit`. For instance, there are
|
|
163
|
+
* fewer than 300 possible values for the dimension `country`, so when
|
|
164
|
+
* reporting on only `country`, you can't get more than 300 rows, even if you
|
|
165
|
+
* set `limit` to a higher value.
|
|
166
|
+
*
|
|
167
|
+
* To learn more about this pagination parameter, see
|
|
168
|
+
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
|
169
|
+
* @param {number[]} request.metricAggregations
|
|
170
|
+
* Aggregation of metrics. Aggregated metric values will be shown in rows
|
|
171
|
+
* where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
|
172
|
+
* @param {number[]} request.orderBys
|
|
173
|
+
* Specifies how rows are ordered in the response.
|
|
174
|
+
* @param {string} request.currencyCode
|
|
175
|
+
* A currency code in ISO4217 format, such as "AED", "USD", "JPY".
|
|
176
|
+
* If the field is empty, the report uses the property's default currency.
|
|
177
|
+
* @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec
|
|
178
|
+
* Cohort group associated with this request. If there is a cohort group
|
|
179
|
+
* in the request the 'cohort' dimension must be present.
|
|
180
|
+
* @param {boolean} request.keepEmptyRows
|
|
181
|
+
* If false or unspecified, each row with all metrics equal to 0 will not be
|
|
182
|
+
* returned. If true, these rows will be returned if they are not separately
|
|
183
|
+
* removed by a filter.
|
|
184
|
+
* @param {boolean} request.returnPropertyQuota
|
|
185
|
+
* Toggles whether to return the current state of this Analytics Property's
|
|
186
|
+
* quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
|
187
|
+
* @param {object} [options]
|
|
188
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
189
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
190
|
+
* The first element of the array is an object representing [RunReportResponse]{@link google.analytics.data.v1beta.RunReportResponse}.
|
|
191
|
+
* Please see the
|
|
192
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
193
|
+
* for more details and examples.
|
|
194
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.run_report.js</caption>
|
|
195
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async
|
|
196
|
+
*/
|
|
197
|
+
runReport(request?: protos.google.analytics.data.v1beta.IRunReportRequest, options?: CallOptions): Promise<[
|
|
198
|
+
protos.google.analytics.data.v1beta.IRunReportResponse,
|
|
199
|
+
protos.google.analytics.data.v1beta.IRunReportRequest | undefined,
|
|
200
|
+
{} | undefined
|
|
201
|
+
]>;
|
|
103
202
|
runReport(request: protos.google.analytics.data.v1beta.IRunReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IRunReportResponse, protos.google.analytics.data.v1beta.IRunReportRequest | null | undefined, {} | null | undefined>): void;
|
|
104
203
|
runReport(request: protos.google.analytics.data.v1beta.IRunReportRequest, callback: Callback<protos.google.analytics.data.v1beta.IRunReportResponse, protos.google.analytics.data.v1beta.IRunReportRequest | null | undefined, {} | null | undefined>): void;
|
|
105
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Returns a customized pivot report of your Google Analytics event data.
|
|
206
|
+
* Pivot reports are more advanced and expressive formats than regular
|
|
207
|
+
* reports. In a pivot report, dimensions are only visible if they are
|
|
208
|
+
* included in a pivot. Multiple pivots can be specified to further dissect
|
|
209
|
+
* your data.
|
|
210
|
+
*
|
|
211
|
+
* @param {Object} request
|
|
212
|
+
* The request object that will be sent.
|
|
213
|
+
* @param {string} request.property
|
|
214
|
+
* A Google Analytics GA4 property identifier whose events are tracked.
|
|
215
|
+
* Specified in the URL path and not the body. To learn more, see [where to
|
|
216
|
+
* find your Property
|
|
217
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
218
|
+
* Within a batch request, this property should either be unspecified or
|
|
219
|
+
* consistent with the batch-level property.
|
|
220
|
+
*
|
|
221
|
+
* Example: properties/1234
|
|
222
|
+
* @param {number[]} request.dimensions
|
|
223
|
+
* The dimensions requested. All defined dimensions must be used by one of the
|
|
224
|
+
* following: dimension_expression, dimension_filter, pivots, order_bys.
|
|
225
|
+
* @param {number[]} request.metrics
|
|
226
|
+
* The metrics requested, at least one metric needs to be specified. All
|
|
227
|
+
* defined metrics must be used by one of the following: metric_expression,
|
|
228
|
+
* metric_filter, order_bys.
|
|
229
|
+
* @param {number[]} request.dateRanges
|
|
230
|
+
* The date range to retrieve event data for the report. If multiple date
|
|
231
|
+
* ranges are specified, event data from each date range is used in the
|
|
232
|
+
* report. A special dimension with field name "dateRange" can be included in
|
|
233
|
+
* a Pivot's field names; if included, the report compares between date
|
|
234
|
+
* ranges. In a cohort request, this `dateRanges` must be unspecified.
|
|
235
|
+
* @param {number[]} request.pivots
|
|
236
|
+
* Describes the visual format of the report's dimensions in columns or rows.
|
|
237
|
+
* The union of the fieldNames (dimension names) in all pivots must be a
|
|
238
|
+
* subset of dimension names defined in Dimensions. No two pivots can share a
|
|
239
|
+
* dimension. A dimension is only visible if it appears in a pivot.
|
|
240
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter
|
|
241
|
+
* The filter clause of dimensions. Dimensions must be requested to be used in
|
|
242
|
+
* this filter. Metrics cannot be used in this filter.
|
|
243
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter
|
|
244
|
+
* The filter clause of metrics. Applied at post aggregation phase, similar to
|
|
245
|
+
* SQL having-clause. Metrics must be requested to be used in this filter.
|
|
246
|
+
* Dimensions cannot be used in this filter.
|
|
247
|
+
* @param {string} request.currencyCode
|
|
248
|
+
* A currency code in ISO4217 format, such as "AED", "USD", "JPY".
|
|
249
|
+
* If the field is empty, the report uses the property's default currency.
|
|
250
|
+
* @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec
|
|
251
|
+
* Cohort group associated with this request. If there is a cohort group
|
|
252
|
+
* in the request the 'cohort' dimension must be present.
|
|
253
|
+
* @param {boolean} request.keepEmptyRows
|
|
254
|
+
* If false or unspecified, each row with all metrics equal to 0 will not be
|
|
255
|
+
* returned. If true, these rows will be returned if they are not separately
|
|
256
|
+
* removed by a filter.
|
|
257
|
+
* @param {boolean} request.returnPropertyQuota
|
|
258
|
+
* Toggles whether to return the current state of this Analytics Property's
|
|
259
|
+
* quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
|
260
|
+
* @param {object} [options]
|
|
261
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
262
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
263
|
+
* The first element of the array is an object representing [RunPivotReportResponse]{@link google.analytics.data.v1beta.RunPivotReportResponse}.
|
|
264
|
+
* Please see the
|
|
265
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
266
|
+
* for more details and examples.
|
|
267
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js</caption>
|
|
268
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async
|
|
269
|
+
*/
|
|
270
|
+
runPivotReport(request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, options?: CallOptions): Promise<[
|
|
271
|
+
protos.google.analytics.data.v1beta.IRunPivotReportResponse,
|
|
272
|
+
protos.google.analytics.data.v1beta.IRunPivotReportRequest | undefined,
|
|
273
|
+
{} | undefined
|
|
274
|
+
]>;
|
|
106
275
|
runPivotReport(request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IRunPivotReportResponse, protos.google.analytics.data.v1beta.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
|
|
107
276
|
runPivotReport(request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, callback: Callback<protos.google.analytics.data.v1beta.IRunPivotReportResponse, protos.google.analytics.data.v1beta.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
|
|
108
|
-
|
|
277
|
+
/**
|
|
278
|
+
* Returns multiple reports in a batch. All reports must be for the same
|
|
279
|
+
* GA4 Property.
|
|
280
|
+
*
|
|
281
|
+
* @param {Object} request
|
|
282
|
+
* The request object that will be sent.
|
|
283
|
+
* @param {string} request.property
|
|
284
|
+
* A Google Analytics GA4 property identifier whose events are tracked.
|
|
285
|
+
* Specified in the URL path and not the body. To learn more, see [where to
|
|
286
|
+
* find your Property
|
|
287
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
288
|
+
* This property must be specified for the batch. The property within
|
|
289
|
+
* RunReportRequest may either be unspecified or consistent with this
|
|
290
|
+
* property.
|
|
291
|
+
*
|
|
292
|
+
* Example: properties/1234
|
|
293
|
+
* @param {number[]} request.requests
|
|
294
|
+
* Individual requests. Each request has a separate report response. Each
|
|
295
|
+
* batch request is allowed up to 5 requests.
|
|
296
|
+
* @param {object} [options]
|
|
297
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
298
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
299
|
+
* The first element of the array is an object representing [BatchRunReportsResponse]{@link google.analytics.data.v1beta.BatchRunReportsResponse}.
|
|
300
|
+
* Please see the
|
|
301
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
302
|
+
* for more details and examples.
|
|
303
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js</caption>
|
|
304
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async
|
|
305
|
+
*/
|
|
306
|
+
batchRunReports(request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, options?: CallOptions): Promise<[
|
|
307
|
+
protos.google.analytics.data.v1beta.IBatchRunReportsResponse,
|
|
308
|
+
protos.google.analytics.data.v1beta.IBatchRunReportsRequest | undefined,
|
|
309
|
+
{} | undefined
|
|
310
|
+
]>;
|
|
109
311
|
batchRunReports(request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IBatchRunReportsResponse, protos.google.analytics.data.v1beta.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
110
312
|
batchRunReports(request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, callback: Callback<protos.google.analytics.data.v1beta.IBatchRunReportsResponse, protos.google.analytics.data.v1beta.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
111
|
-
|
|
313
|
+
/**
|
|
314
|
+
* Returns multiple pivot reports in a batch. All reports must be for the same
|
|
315
|
+
* GA4 Property.
|
|
316
|
+
*
|
|
317
|
+
* @param {Object} request
|
|
318
|
+
* The request object that will be sent.
|
|
319
|
+
* @param {string} request.property
|
|
320
|
+
* A Google Analytics GA4 property identifier whose events are tracked.
|
|
321
|
+
* Specified in the URL path and not the body. To learn more, see [where to
|
|
322
|
+
* find your Property
|
|
323
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
324
|
+
* This property must be specified for the batch. The property within
|
|
325
|
+
* RunPivotReportRequest may either be unspecified or consistent with this
|
|
326
|
+
* property.
|
|
327
|
+
*
|
|
328
|
+
* Example: properties/1234
|
|
329
|
+
* @param {number[]} request.requests
|
|
330
|
+
* Individual requests. Each request has a separate pivot report response.
|
|
331
|
+
* Each batch request is allowed up to 5 requests.
|
|
332
|
+
* @param {object} [options]
|
|
333
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
334
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
335
|
+
* The first element of the array is an object representing [BatchRunPivotReportsResponse]{@link google.analytics.data.v1beta.BatchRunPivotReportsResponse}.
|
|
336
|
+
* Please see the
|
|
337
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
338
|
+
* for more details and examples.
|
|
339
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js</caption>
|
|
340
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async
|
|
341
|
+
*/
|
|
342
|
+
batchRunPivotReports(request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, options?: CallOptions): Promise<[
|
|
343
|
+
protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse,
|
|
344
|
+
(protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest | undefined),
|
|
345
|
+
{} | undefined
|
|
346
|
+
]>;
|
|
112
347
|
batchRunPivotReports(request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
113
348
|
batchRunPivotReports(request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, callback: Callback<protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
114
|
-
|
|
349
|
+
/**
|
|
350
|
+
* Returns metadata for dimensions and metrics available in reporting methods.
|
|
351
|
+
* Used to explore the dimensions and metrics. In this method, a Google
|
|
352
|
+
* Analytics GA4 Property Identifier is specified in the request, and
|
|
353
|
+
* the metadata response includes Custom dimensions and metrics as well as
|
|
354
|
+
* Universal metadata.
|
|
355
|
+
*
|
|
356
|
+
* For example if a custom metric with parameter name `levels_unlocked` is
|
|
357
|
+
* registered to a property, the Metadata response will contain
|
|
358
|
+
* `customEvent:levels_unlocked`. Universal metadata are dimensions and
|
|
359
|
+
* metrics applicable to any property such as `country` and `totalUsers`.
|
|
360
|
+
*
|
|
361
|
+
* @param {Object} request
|
|
362
|
+
* The request object that will be sent.
|
|
363
|
+
* @param {string} request.name
|
|
364
|
+
* Required. The resource name of the metadata to retrieve. This name field is
|
|
365
|
+
* specified in the URL path and not URL parameters. Property is a numeric
|
|
366
|
+
* Google Analytics GA4 Property identifier. To learn more, see [where to find
|
|
367
|
+
* your Property
|
|
368
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
369
|
+
*
|
|
370
|
+
* Example: properties/1234/metadata
|
|
371
|
+
*
|
|
372
|
+
* Set the Property ID to 0 for dimensions and metrics common to all
|
|
373
|
+
* properties. In this special mode, this method will not return custom
|
|
374
|
+
* dimensions and metrics.
|
|
375
|
+
* @param {object} [options]
|
|
376
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
377
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
378
|
+
* The first element of the array is an object representing [Metadata]{@link google.analytics.data.v1beta.Metadata}.
|
|
379
|
+
* Please see the
|
|
380
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
381
|
+
* for more details and examples.
|
|
382
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.get_metadata.js</caption>
|
|
383
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async
|
|
384
|
+
*/
|
|
385
|
+
getMetadata(request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, options?: CallOptions): Promise<[
|
|
386
|
+
protos.google.analytics.data.v1beta.IMetadata,
|
|
387
|
+
protos.google.analytics.data.v1beta.IGetMetadataRequest | undefined,
|
|
388
|
+
{} | undefined
|
|
389
|
+
]>;
|
|
115
390
|
getMetadata(request: protos.google.analytics.data.v1beta.IGetMetadataRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IMetadata, protos.google.analytics.data.v1beta.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
|
|
116
391
|
getMetadata(request: protos.google.analytics.data.v1beta.IGetMetadataRequest, callback: Callback<protos.google.analytics.data.v1beta.IMetadata, protos.google.analytics.data.v1beta.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
|
|
117
|
-
|
|
392
|
+
/**
|
|
393
|
+
* The Google Analytics Realtime API returns a customized report of realtime
|
|
394
|
+
* event data for your property. These reports show events and usage from the
|
|
395
|
+
* last 30 minutes.
|
|
396
|
+
*
|
|
397
|
+
* @param {Object} request
|
|
398
|
+
* The request object that will be sent.
|
|
399
|
+
* @param {string} request.property
|
|
400
|
+
* A Google Analytics GA4 property identifier whose events are tracked.
|
|
401
|
+
* Specified in the URL path and not the body. To learn more, see [where to
|
|
402
|
+
* find your Property
|
|
403
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
404
|
+
*
|
|
405
|
+
* Example: properties/1234
|
|
406
|
+
* @param {number[]} request.dimensions
|
|
407
|
+
* The dimensions requested and displayed.
|
|
408
|
+
* @param {number[]} request.metrics
|
|
409
|
+
* The metrics requested and displayed.
|
|
410
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter
|
|
411
|
+
* The filter clause of dimensions. Dimensions must be requested to be used in
|
|
412
|
+
* this filter. Metrics cannot be used in this filter.
|
|
413
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter
|
|
414
|
+
* The filter clause of metrics. Applied at post aggregation phase, similar to
|
|
415
|
+
* SQL having-clause. Metrics must be requested to be used in this filter.
|
|
416
|
+
* Dimensions cannot be used in this filter.
|
|
417
|
+
* @param {number} request.limit
|
|
418
|
+
* The number of rows to return. If unspecified, 10,000 rows are returned. The
|
|
419
|
+
* API returns a maximum of 100,000 rows per request, no matter how many you
|
|
420
|
+
* ask for. `limit` must be positive.
|
|
421
|
+
*
|
|
422
|
+
* The API can also return fewer rows than the requested `limit`, if there
|
|
423
|
+
* aren't as many dimension values as the `limit`. For instance, there are
|
|
424
|
+
* fewer than 300 possible values for the dimension `country`, so when
|
|
425
|
+
* reporting on only `country`, you can't get more than 300 rows, even if you
|
|
426
|
+
* set `limit` to a higher value.
|
|
427
|
+
* @param {number[]} request.metricAggregations
|
|
428
|
+
* Aggregation of metrics. Aggregated metric values will be shown in rows
|
|
429
|
+
* where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
|
430
|
+
* @param {number[]} request.orderBys
|
|
431
|
+
* Specifies how rows are ordered in the response.
|
|
432
|
+
* @param {boolean} request.returnPropertyQuota
|
|
433
|
+
* Toggles whether to return the current state of this Analytics Property's
|
|
434
|
+
* Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
|
435
|
+
* @param {number[]} request.minuteRanges
|
|
436
|
+
* The minute ranges of event data to read. If unspecified, one minute range
|
|
437
|
+
* for the last 30 minutes will be used. If multiple minute ranges are
|
|
438
|
+
* requested, each response row will contain a zero based minute range index.
|
|
439
|
+
* If two minute ranges overlap, the event data for the overlapping minutes is
|
|
440
|
+
* included in the response rows for both minute ranges.
|
|
441
|
+
* @param {object} [options]
|
|
442
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
443
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
444
|
+
* The first element of the array is an object representing [RunRealtimeReportResponse]{@link google.analytics.data.v1beta.RunRealtimeReportResponse}.
|
|
445
|
+
* Please see the
|
|
446
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
447
|
+
* for more details and examples.
|
|
448
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js</caption>
|
|
449
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async
|
|
450
|
+
*/
|
|
451
|
+
runRealtimeReport(request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, options?: CallOptions): Promise<[
|
|
452
|
+
protos.google.analytics.data.v1beta.IRunRealtimeReportResponse,
|
|
453
|
+
protos.google.analytics.data.v1beta.IRunRealtimeReportRequest | undefined,
|
|
454
|
+
{} | undefined
|
|
455
|
+
]>;
|
|
118
456
|
runRealtimeReport(request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, protos.google.analytics.data.v1beta.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;
|
|
119
457
|
runRealtimeReport(request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, callback: Callback<protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, protos.google.analytics.data.v1beta.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;
|
|
120
|
-
|
|
458
|
+
/**
|
|
459
|
+
* This compatibility method lists dimensions and metrics that can be added to
|
|
460
|
+
* a report request and maintain compatibility. This method fails if the
|
|
461
|
+
* request's dimensions and metrics are incompatible.
|
|
462
|
+
*
|
|
463
|
+
* In Google Analytics, reports fail if they request incompatible dimensions
|
|
464
|
+
* and/or metrics; in that case, you will need to remove dimensions and/or
|
|
465
|
+
* metrics from the incompatible report until the report is compatible.
|
|
466
|
+
*
|
|
467
|
+
* The Realtime and Core reports have different compatibility rules. This
|
|
468
|
+
* method checks compatibility for Core reports.
|
|
469
|
+
*
|
|
470
|
+
* @param {Object} request
|
|
471
|
+
* The request object that will be sent.
|
|
472
|
+
* @param {string} request.property
|
|
473
|
+
* A Google Analytics GA4 property identifier whose events are tracked. To
|
|
474
|
+
* learn more, see [where to find your Property
|
|
475
|
+
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
|
476
|
+
* `property` should be the same value as in your `runReport` request.
|
|
477
|
+
*
|
|
478
|
+
* Example: properties/1234
|
|
479
|
+
*
|
|
480
|
+
* Set the Property ID to 0 for compatibility checking on dimensions and
|
|
481
|
+
* metrics common to all properties. In this special mode, this method will
|
|
482
|
+
* not return custom dimensions and metrics.
|
|
483
|
+
* @param {number[]} request.dimensions
|
|
484
|
+
* The dimensions in this report. `dimensions` should be the same value as in
|
|
485
|
+
* your `runReport` request.
|
|
486
|
+
* @param {number[]} request.metrics
|
|
487
|
+
* The metrics in this report. `metrics` should be the same value as in your
|
|
488
|
+
* `runReport` request.
|
|
489
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter
|
|
490
|
+
* The filter clause of dimensions. `dimensionFilter` should be the same value
|
|
491
|
+
* as in your `runReport` request.
|
|
492
|
+
* @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter
|
|
493
|
+
* The filter clause of metrics. `metricFilter` should be the same value as in
|
|
494
|
+
* your `runReport` request
|
|
495
|
+
* @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter
|
|
496
|
+
* Filters the dimensions and metrics in the response to just this
|
|
497
|
+
* compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”`
|
|
498
|
+
* to only return compatible dimensions & metrics.
|
|
499
|
+
* @param {object} [options]
|
|
500
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
501
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
502
|
+
* The first element of the array is an object representing [CheckCompatibilityResponse]{@link google.analytics.data.v1beta.CheckCompatibilityResponse}.
|
|
503
|
+
* Please see the
|
|
504
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
505
|
+
* for more details and examples.
|
|
506
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js</caption>
|
|
507
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async
|
|
508
|
+
*/
|
|
509
|
+
checkCompatibility(request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, options?: CallOptions): Promise<[
|
|
510
|
+
protos.google.analytics.data.v1beta.ICheckCompatibilityResponse,
|
|
511
|
+
(protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | undefined),
|
|
512
|
+
{} | undefined
|
|
513
|
+
]>;
|
|
121
514
|
checkCompatibility(request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | null | undefined, {} | null | undefined>): void;
|
|
122
515
|
checkCompatibility(request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, callback: Callback<protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | null | undefined, {} | null | undefined>): void;
|
|
123
516
|
/**
|