@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.
|
|
@@ -20,9 +20,6 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
20
20
|
innerApiCalls: {
|
|
21
21
|
[name: string]: Function;
|
|
22
22
|
};
|
|
23
|
-
pathTemplates: {
|
|
24
|
-
[name: string]: gax.PathTemplate;
|
|
25
|
-
};
|
|
26
23
|
alphaAnalyticsDataStub?: Promise<{
|
|
27
24
|
[name: string]: Function;
|
|
28
25
|
}>;
|
|
@@ -31,7 +28,7 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
31
28
|
*
|
|
32
29
|
* @param {object} [options] - The configuration object.
|
|
33
30
|
* The options accepted by the constructor are described in detail
|
|
34
|
-
* in [this document](https://github.com/googleapis/gax-nodejs/blob/
|
|
31
|
+
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
|
|
35
32
|
* The common options are:
|
|
36
33
|
* @param {object} [options.credentials] - Credentials object.
|
|
37
34
|
* @param {string} [options.credentials.client_email]
|
|
@@ -54,13 +51,19 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
54
51
|
* API remote host.
|
|
55
52
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
56
53
|
* Follows the structure of {@link gapicConfig}.
|
|
57
|
-
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
54
|
+
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
|
|
55
|
+
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
56
|
+
* For more information, please check the
|
|
57
|
+
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
58
|
+
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
59
|
+
* need to avoid loading the default gRPC version and want to use the fallback
|
|
60
|
+
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
61
|
+
* ```
|
|
62
|
+
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
63
|
+
* const client = new AlphaAnalyticsDataClient({fallback: 'rest'}, gax);
|
|
64
|
+
* ```
|
|
62
65
|
*/
|
|
63
|
-
constructor(opts?: ClientOptions);
|
|
66
|
+
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
64
67
|
/**
|
|
65
68
|
* Initialize the client.
|
|
66
69
|
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
@@ -99,39 +102,97 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
99
102
|
static get scopes(): string[];
|
|
100
103
|
getProjectId(): Promise<string>;
|
|
101
104
|
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
102
|
-
runReport(request?: protos.google.analytics.data.v1alpha.IRunReportRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | undefined, {} | undefined]>;
|
|
103
|
-
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
|
|
104
|
-
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
|
|
105
|
-
runPivotReport(request?: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | undefined, {} | undefined]>;
|
|
106
|
-
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
|
|
107
|
-
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
|
|
108
|
-
batchRunReports(request?: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | undefined, {} | undefined]>;
|
|
109
|
-
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
110
|
-
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
111
|
-
batchRunPivotReports(request?: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, (protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | undefined), {} | undefined]>;
|
|
112
|
-
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
113
|
-
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
|
|
114
|
-
getMetadata(request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | undefined, {} | undefined]>;
|
|
115
|
-
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
|
|
116
|
-
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
|
|
117
|
-
runRealtimeReport(request?: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, (protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | undefined), {} | undefined]>;
|
|
118
|
-
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;
|
|
119
|
-
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;
|
|
120
105
|
/**
|
|
121
|
-
*
|
|
106
|
+
* Returns a customized funnel report of your Google Analytics event data. The
|
|
107
|
+
* data returned from the API is as a table with columns for the requested
|
|
108
|
+
* dimensions and metrics.
|
|
122
109
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
110
|
+
* Funnel exploration lets you visualize the steps your users take to complete
|
|
111
|
+
* a task and quickly see how well they are succeeding or failing at each
|
|
112
|
+
* step. For example, how do prospects become shoppers and then become buyers?
|
|
113
|
+
* How do one time buyers become repeat buyers? With this information, you can
|
|
114
|
+
* improve inefficient or abandoned customer journeys. To learn more, see [GA4
|
|
115
|
+
* Funnel Explorations](https://support.google.com/analytics/answer/9327974).
|
|
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.dateRanges
|
|
129
|
+
* Date ranges of data to read. If multiple date ranges are requested, each
|
|
130
|
+
* response row will contain a zero based date range index. If two date
|
|
131
|
+
* ranges overlap, the event data for the overlapping days is included in the
|
|
132
|
+
* response rows for both date ranges.
|
|
133
|
+
* @param {google.analytics.data.v1alpha.Funnel} request.funnel
|
|
134
|
+
* The configuration of this request's funnel. This funnel configuration is
|
|
135
|
+
* required.
|
|
136
|
+
* @param {google.analytics.data.v1alpha.FunnelBreakdown} request.funnelBreakdown
|
|
137
|
+
* If specified, this breakdown adds a dimension to the funnel table sub
|
|
138
|
+
* report response. This breakdown dimension expands each funnel step to the
|
|
139
|
+
* unique values of the breakdown dimension. For example, a breakdown by the
|
|
140
|
+
* `deviceCategory` dimension will create rows for `mobile`, `tablet`,
|
|
141
|
+
* `desktop`, and the total.
|
|
142
|
+
* @param {google.analytics.data.v1alpha.FunnelNextAction} request.funnelNextAction
|
|
143
|
+
* If specified, next action adds a dimension to the funnel visualization sub
|
|
144
|
+
* report response. This next action dimension expands each funnel step to the
|
|
145
|
+
* unique values of the next action. For example a next action of the
|
|
146
|
+
* `eventName` dimension will create rows for several events (i.e.
|
|
147
|
+
* `session_start` & `click`) and the total.
|
|
148
|
+
*
|
|
149
|
+
* Next action only supports `eventName` and most Page / Screen dimensions
|
|
150
|
+
* like `pageTitle` and `pagePath`.
|
|
151
|
+
* @param {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} request.funnelVisualizationType
|
|
152
|
+
* The funnel visualization type controls the dimensions present in the funnel
|
|
153
|
+
* visualization sub report response. If not specified, `STANDARD_FUNNEL` is
|
|
154
|
+
* used.
|
|
155
|
+
* @param {number[]} request.segments
|
|
156
|
+
* The configurations of segments. Segments are subsets of a property's data.
|
|
157
|
+
* In a funnel report with segments, the funnel is evaluated in each segment.
|
|
158
|
+
*
|
|
159
|
+
* Each segment specified in this request
|
|
160
|
+
* produces a separate row in the response; in the response, each segment
|
|
161
|
+
* identified by its name.
|
|
162
|
+
*
|
|
163
|
+
* The segments parameter is optional. Requests are limited to 4 segments.
|
|
164
|
+
* @param {number} request.limit
|
|
165
|
+
* The number of rows to return. If unspecified, 10,000 rows are returned. The
|
|
166
|
+
* API returns a maximum of 100,000 rows per request, no matter how many you
|
|
167
|
+
* ask for. `limit` must be positive.
|
|
129
168
|
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @
|
|
169
|
+
* The API can also return fewer rows than the requested `limit`, if there
|
|
170
|
+
* aren't as many dimension values as the `limit`.
|
|
171
|
+
* @param {google.analytics.data.v1alpha.FilterExpression} request.dimensionFilter
|
|
172
|
+
* Dimension filters allow you to ask for only specific dimension values in
|
|
173
|
+
* the report. To learn more, see [Creating a Report: Dimension
|
|
174
|
+
* Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
|
|
175
|
+
* for examples. Metrics cannot be used in this filter.
|
|
176
|
+
* @param {boolean} request.returnPropertyQuota
|
|
177
|
+
* Toggles whether to return the current state of this Analytics Property's
|
|
178
|
+
* quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
|
179
|
+
* @param {object} [options]
|
|
180
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
181
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
182
|
+
* The first element of the array is an object representing [RunFunnelReportResponse]{@link google.analytics.data.v1alpha.RunFunnelReportResponse}.
|
|
183
|
+
* Please see the
|
|
184
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
185
|
+
* for more details and examples.
|
|
186
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js</caption>
|
|
187
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async
|
|
133
188
|
*/
|
|
134
|
-
|
|
189
|
+
runFunnelReport(request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, options?: CallOptions): Promise<[
|
|
190
|
+
protos.google.analytics.data.v1alpha.IRunFunnelReportResponse,
|
|
191
|
+
protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | undefined,
|
|
192
|
+
{} | undefined
|
|
193
|
+
]>;
|
|
194
|
+
runFunnelReport(request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | null | undefined, {} | null | undefined>): void;
|
|
195
|
+
runFunnelReport(request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | null | undefined, {} | null | undefined>): void;
|
|
135
196
|
/**
|
|
136
197
|
* Terminate the gRPC channel and close the client.
|
|
137
198
|
*
|