Constructor
new AlphaAnalyticsDataClient(optionsopt)
Construct an instance of AlphaAnalyticsDataClient.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. See the subsequent parameters for more details. Properties
|
Members
apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
port
The port for this API service.
scopes
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
The DNS address for this API service.
Methods
batchRunPivotReports(request, optionsopt) → {Promise}
Returns multiple pivot reports in a batch. All reports must be for the same Entity.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
batchRunReports(request, optionsopt) → {Promise}
Returns multiple reports in a batch. All reports must be for the same Entity.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
close()
Terminate the GRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
getMetadata(request, optionsopt) → {Promise}
Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics 4 (GA4) Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata.
For example if a custom metric with parameter name levels_unlocked is
registered to a property, the Metadata response will contain
customEvent:levels_unlocked. Universal metadata are dimensions and
metrics applicable to any property such as country and totalUsers.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getProjectId(callback)
Return the project ID used by this class.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function |
the callback to be called with the current project Id. |
getUniversalMetadata(request, optionsopt) → {Promise}
Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and deletions may occur.
This method returns Universal Metadata. Universal Metadata are dimensions
and metrics applicable to any property such as country and totalUsers.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
request |
Object |
The request object that will be sent. |
|
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
initialize() → {Promise}
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns:
| Type | Description |
|---|---|
| Promise |
A promise that resolves to an authenticated service stub. |
matchPropertyFromMetadataName(metadataName) → {string}
Parse the property from Metadata resource.
Parameters:
| Name | Type | Description |
|---|---|---|
metadataName |
string |
A fully-qualified path representing Metadata resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the property. |
metadataPath(property) → {string}
Return a fully-qualified metadata resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
property |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
runPivotReport(request, optionsopt) → {Promise}
Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
runReport(request, optionsopt) → {Promise}
Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||||||||||||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|