AnalyticsAdminServiceClient

AnalyticsAdminServiceClient

Service Interface for the Analytics Admin API (GA4).

Constructor

new AnalyticsAdminServiceClient(optionsopt)

Construct an instance of AnalyticsAdminServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP fallback mode. In fallback mode, a special browser-compatible transport implementation is used instead of gRPC transport. In browser context (if the window object is defined) the fallback mode is enabled automatically; set options.fallback to false if you need to override this behavior.

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

accountPath(account) → {string}

Return a fully-qualified account resource name string.

Parameters:
Name Type Description
account string
Returns:
Type Description
string

Resource name string.

accountSummaryPath(account_summary) → {string}

Return a fully-qualified accountSummary resource name string.

Parameters:
Name Type Description
account_summary string
Returns:
Type Description
string

Resource name string.

accountUserLinkPath(account, user_link) → {string}

Return a fully-qualified accountUserLink resource name string.

Parameters:
Name Type Description
account string
user_link string
Returns:
Type Description
string

Resource name string.

androidAppDataStreamPath(property, android_app_data_stream) → {string}

Return a fully-qualified androidAppDataStream resource name string.

Parameters:
Name Type Description
property string
android_app_data_stream string
Returns:
Type Description
string

Resource name string.

archiveCustomDimension(request, optionsopt) → {Promise}

Archives a CustomDimension on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.archiveCustomDimension(request);

archiveCustomMetric(request, optionsopt) → {Promise}

Archives a CustomMetric on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.archiveCustomMetric(request);

Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles.

If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: accounts/1234

pageSize number

The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 1000 user links will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000.

pageToken string

A page token, received from a previous AuditUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to AuditUserLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of AuditUserLink. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using auditUserLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

auditUserLinksAsync(request, optionsopt) → {Object}

Equivalent to auditUserLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: accounts/1234

pageSize number

The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 1000 user links will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000.

pageToken string

A page token, received from a previous AuditUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to AuditUserLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing AuditUserLink. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.auditUserLinksAsync(request);
for await (const response of iterable) {
  // process response
}

auditUserLinksStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: accounts/1234

pageSize number

The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 1000 user links will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000.

pageToken string

A page token, received from a previous AuditUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to AuditUserLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing AuditUserLink on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using auditUserLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

Creates information about multiple users' links to an account or property.

This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234

notifyNewUsers boolean <optional>

Optional. If set, then email the new users notifying them that they've been granted permissions to the resource. Regardless of whether this is set or not, notify_new_user field inside each individual request is ignored.

requests Array.<number>

Required. The requests specifying the user links to create. A maximum of 1000 user links can be created in a batch.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
const [response] = await client.batchCreateUserLinks(request);

Deletes information about multiple users' links to an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234

requests Array.<number>

Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
const [response] = await client.batchDeleteUserLinks(request);

Gets information about multiple users' links to an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234

names Array.<string>

Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
const [response] = await client.batchGetUserLinks(request);

Updates information about multiple users' links to an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234

requests Array.<number>

Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
const [response] = await client.batchUpdateUserLinks(request);

close() → {Promise}

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

conversionEventPath(property, conversion_event) → {string}

Return a fully-qualified conversionEvent resource name string.

Parameters:
Name Type Description
property string
conversion_event string
Returns:
Type Description
string

Resource name string.

createConversionEvent(request, optionsopt) → {Promise}

Creates a conversion event with the specified attributes.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
conversionEvent google.analytics.admin.v1alpha.ConversionEvent

Required. The conversion event to create.

parent string

Required. The resource name of the parent property where this conversion event will be created. Format: properties/123

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing ConversionEvent. Please see the documentation for more details and examples.
Example
const [response] = await client.createConversionEvent(request);

createCustomDimension(request, optionsopt) → {Promise}

Creates a CustomDimension.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

customDimension google.analytics.admin.v1alpha.CustomDimension

Required. The CustomDimension to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing CustomDimension. Please see the documentation for more details and examples.
Example
const [response] = await client.createCustomDimension(request);

createCustomMetric(request, optionsopt) → {Promise}

Creates a CustomMetric.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

customMetric google.analytics.admin.v1alpha.CustomMetric

Required. The CustomMetric to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing CustomMetric. Please see the documentation for more details and examples.
Example
const [response] = await client.createCustomMetric(request);

Creates a FirebaseLink.

Properties can have at most one FirebaseLink.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Format: properties/{property_id} Example: properties/1234

firebaseLink google.analytics.admin.v1alpha.FirebaseLink

Required. The Firebase link to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing FirebaseLink. Please see the documentation for more details and examples.
const [response] = await client.createFirebaseLink(request);

Creates a GoogleAdsLink.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

googleAdsLink google.analytics.admin.v1alpha.GoogleAdsLink

Required. The GoogleAdsLink to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing GoogleAdsLink. Please see the documentation for more details and examples.
const [response] = await client.createGoogleAdsLink(request);

createMeasurementProtocolSecret(request, optionsopt) → {Promise}

Creates a measurement protocol secret.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource where this secret will be created. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}

measurementProtocolSecret google.analytics.admin.v1alpha.MeasurementProtocolSecret

Required. The measurement protocol secret to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.createMeasurementProtocolSecret(request);

createProperty(request, optionsopt) → {Promise}

Creates an "GA4" property with the specified location and attributes.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
property google.analytics.admin.v1alpha.Property

Required. The property to create. Note: the supplied property must specify its parent.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Property. Please see the documentation for more details and examples.
Example
const [response] = await client.createProperty(request);

Creates a user link on an account or property.

If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. Example format: accounts/1234

notifyNewUser boolean <optional>

Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.

userLink google.analytics.admin.v1alpha.UserLink

Required. The user link to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing UserLink. Please see the documentation for more details and examples.
const [response] = await client.createUserLink(request);

createWebDataStream(request, optionsopt) → {Promise}

Creates a web stream with the specified location and attributes.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
webDataStream google.analytics.admin.v1alpha.WebDataStream

Required. The web stream to create.

parent string

Required. The parent resource where this web data stream will be created. Format: properties/123

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing WebDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.createWebDataStream(request);

customDimensionPath(property) → {string}

Return a fully-qualified customDimension resource name string.

Parameters:
Name Type Description
property string
Returns:
Type Description
string

Resource name string.

customMetricPath(property) → {string}

Return a fully-qualified customMetric resource name string.

Parameters:
Name Type Description
property string
Returns:
Type Description
string

Resource name string.

dataSharingSettingsPath(account) → {string}

Return a fully-qualified dataSharingSettings resource name string.

Parameters:
Name Type Description
account string
Returns:
Type Description
string

Resource name string.

deleteAccount(request, optionsopt) → {Promise}

Marks target Account as soft-deleted (ie: "trashed") and returns it.

This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.

If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteAccount(request);

deleteAndroidAppDataStream(request, optionsopt) → {Promise}

Deletes an android app stream on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the android app data stream to delete. Format: properties/{property_id}/androidAppDataStreams/{stream_id} Example: "properties/123/androidAppDataStreams/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteAndroidAppDataStream(request);

deleteConversionEvent(request, optionsopt) → {Promise}

Deletes a conversion event in a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteConversionEvent(request);

Deletes a FirebaseLink on a property

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
const [response] = await client.deleteFirebaseLink(request);

Deletes a GoogleAdsLink on a property

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Example format: properties/1234/googleAdsLinks/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
const [response] = await client.deleteGoogleAdsLink(request);

deleteIosAppDataStream(request, optionsopt) → {Promise}

Deletes an iOS app stream on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the iOS app data stream to delete. Format: properties/{property_id}/iosAppDataStreams/{stream_id} Example: "properties/123/iosAppDataStreams/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteIosAppDataStream(request);

deleteMeasurementProtocolSecret(request, optionsopt) → {Promise}

Deletes target MeasurementProtocolSecret.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteMeasurementProtocolSecret(request);

deleteProperty(request, optionsopt) → {Promise}

Marks target Property as soft-deleted (ie: "trashed") and returns it.

This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.

If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found, or is not an GA4 Property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Property. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteProperty(request);

Deletes a user link on an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Example format: accounts/1234/userLinks/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
const [response] = await client.deleteUserLink(request);

deleteWebDataStream(request, optionsopt) → {Promise}

Deletes a web stream on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the web data stream to delete. Format: properties/{property_id}/webDataStreams/{stream_id} Example: "properties/123/webDataStreams/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteWebDataStream(request);

enhancedMeasurementSettingsPath(property, web_data_stream) → {string}

Return a fully-qualified enhancedMeasurementSettings resource name string.

Parameters:
Name Type Description
property string
web_data_stream string
Returns:
Type Description
string

Resource name string.

firebaseLinkPath(property, firebase_link) → {string}

Return a fully-qualified firebaseLink resource name string.

Parameters:
Name Type Description
property string
firebase_link string
Returns:
Type Description
string

Resource name string.

getAccount(request, optionsopt) → {Promise}

Lookup for a single Account.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Account. Please see the documentation for more details and examples.
Example
const [response] = await client.getAccount(request);

getAndroidAppDataStream(request, optionsopt) → {Promise}

Lookup for a single AndroidAppDataStream

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the android app data stream to lookup. Format: properties/{property_id}/androidAppDataStreams/{stream_id} Example: "properties/123/androidAppDataStreams/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing AndroidAppDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.getAndroidAppDataStream(request);

getConversionEvent(request, optionsopt) → {Promise}

Retrieve a single conversion event.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing ConversionEvent. Please see the documentation for more details and examples.
Example
const [response] = await client.getConversionEvent(request);

getCustomDimension(request, optionsopt) → {Promise}

Lookup for a single CustomDimension.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing CustomDimension. Please see the documentation for more details and examples.
Example
const [response] = await client.getCustomDimension(request);

getCustomMetric(request, optionsopt) → {Promise}

Lookup for a single CustomMetric.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing CustomMetric. Please see the documentation for more details and examples.
Example
const [response] = await client.getCustomMetric(request);

getDataSharingSettings(request, optionsopt) → {Promise}

Get data sharing settings on an account. Data sharing settings are singletons.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing DataSharingSettings. Please see the documentation for more details and examples.
Example
const [response] = await client.getDataSharingSettings(request);

getEnhancedMeasurementSettings(request, optionsopt) → {Promise}

Returns the singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the settings to lookup. Format: properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.getEnhancedMeasurementSettings(request);

getGlobalSiteTag(request, optionsopt) → {Promise}

Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag Example: "properties/123/webDataStreams/456/globalSiteTag"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing GlobalSiteTag. Please see the documentation for more details and examples.
Example
const [response] = await client.getGlobalSiteTag(request);

getGoogleSignalsSettings(request, optionsopt) → {Promise}

Lookup for Google Signals settings for a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing GoogleSignalsSettings. Please see the documentation for more details and examples.
Example
const [response] = await client.getGoogleSignalsSettings(request);

getIosAppDataStream(request, optionsopt) → {Promise}

Lookup for a single IosAppDataStream

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the iOS app data stream to lookup. Format: properties/{property_id}/iosAppDataStreams/{stream_id} Example: "properties/123/iosAppDataStreams/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing IosAppDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.getIosAppDataStream(request);

getMeasurementProtocolSecret(request, optionsopt) → {Promise}

Lookup for a single "GA4" MeasurementProtocolSecret.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.getMeasurementProtocolSecret(request);

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

getProperty(request, optionsopt) → {Promise}

Lookup for a single "GA4" Property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Property. Please see the documentation for more details and examples.
Example
const [response] = await client.getProperty(request);

Gets information about a user's link to an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Example format: accounts/1234/userLinks/5678

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing UserLink. Please see the documentation for more details and examples.
const [response] = await client.getUserLink(request);

getWebDataStream(request, optionsopt) → {Promise}

Lookup for a single WebDataStream

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the web data stream to lookup. Format: properties/{property_id}/webDataStreams/{stream_id} Example: "properties/123/webDataStreams/456"

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing WebDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.getWebDataStream(request);

globalSiteTagPath(property) → {string}

Return a fully-qualified globalSiteTag resource name string.

Parameters:
Name Type Description
property string
Returns:
Type Description
string

Resource name string.

googleAdsLinkPath(property, google_ads_link) → {string}

Return a fully-qualified googleAdsLink resource name string.

Parameters:
Name Type Description
property string
google_ads_link string
Returns:
Type Description
string

Resource name string.

googleSignalsSettingsPath(property) → {string}

Return a fully-qualified googleSignalsSettings resource name string.

Parameters:
Name Type Description
property string
Returns:
Type Description
string

Resource name string.

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.

iosAppDataStreamPath(property, ios_app_data_stream) → {string}

Return a fully-qualified iosAppDataStream resource name string.

Parameters:
Name Type Description
property string
ios_app_data_stream string
Returns:
Type Description
string

Resource name string.

listAccounts(request, optionsopt) → {Promise}

Returns all accounts accessible by the caller.

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListAccounts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccounts must match the call that provided the page token.

showDeleted boolean

Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Account. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAccountsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAccountsAsync(request, optionsopt) → {Object}

Equivalent to listAccounts, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListAccounts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccounts must match the call that provided the page token.

showDeleted boolean

Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Account. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listAccountsAsync(request);
for await (const response of iterable) {
  // process response
}

listAccountsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListAccounts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccounts must match the call that provided the page token.

showDeleted boolean

Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Account on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAccountsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAccountSummaries(request, optionsopt) → {Promise}

Returns summaries of all accounts accessible by the caller.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
pageSize number

The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListAccountSummaries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccountSummaries must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of AccountSummary. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAccountSummariesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAccountSummariesAsync(request, optionsopt) → {Object}

Equivalent to listAccountSummaries, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
pageSize number

The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListAccountSummaries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccountSummaries must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing AccountSummary. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listAccountSummariesAsync(request);
for await (const response of iterable) {
  // process response
}

listAccountSummariesStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
pageSize number

The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListAccountSummaries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccountSummaries must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing AccountSummary on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAccountSummariesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAndroidAppDataStreams(request, optionsopt) → {Promise}

Returns child android app streams under the specified parent property.

Android app streams will be excluded if the caller does not have access. Returns an empty list if no relevant android app streams are found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to limit results to app streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return.

If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAndroidAppDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of AndroidAppDataStream. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAndroidAppDataStreamsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAndroidAppDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listAndroidAppDataStreams, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to limit results to app streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return.

If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAndroidAppDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing AndroidAppDataStream. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listAndroidAppDataStreamsAsync(request);
for await (const response of iterable) {
  // process response
}

listAndroidAppDataStreamsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to limit results to app streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return.

If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAndroidAppDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing AndroidAppDataStream on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAndroidAppDataStreamsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConversionEvents(request, optionsopt) → {Promise}

Returns a list of conversion events in the specified parent property.

Returns an empty list if no conversion events are found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the parent property. Example: 'properties/123'

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListConversionEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListConversionEvents must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of ConversionEvent. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listConversionEventsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConversionEventsAsync(request, optionsopt) → {Object}

Equivalent to listConversionEvents, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the parent property. Example: 'properties/123'

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListConversionEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListConversionEvents must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ConversionEvent. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listConversionEventsAsync(request);
for await (const response of iterable) {
  // process response
}

listConversionEventsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the parent property. Example: 'properties/123'

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListConversionEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListConversionEvents must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing ConversionEvent on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listConversionEventsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomDimensions(request, optionsopt) → {Promise}

Lists CustomDimensions on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListCustomDimensions call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomDimensions must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of CustomDimension. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCustomDimensionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomDimensionsAsync(request, optionsopt) → {Object}

Equivalent to listCustomDimensions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListCustomDimensions call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomDimensions must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CustomDimension. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listCustomDimensionsAsync(request);
for await (const response of iterable) {
  // process response
}

listCustomDimensionsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListCustomDimensions call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomDimensions must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing CustomDimension on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCustomDimensionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomMetrics(request, optionsopt) → {Promise}

Lists CustomMetrics on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListCustomMetrics call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomMetrics must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of CustomMetric. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCustomMetricsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomMetricsAsync(request, optionsopt) → {Object}

Equivalent to listCustomMetrics, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListCustomMetrics call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomMetrics must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CustomMetric. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listCustomMetricsAsync(request);
for await (const response of iterable) {
  // process response
}

listCustomMetricsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListCustomMetrics call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomMetrics must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing CustomMetric on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCustomMetricsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Format: properties/{property_id} Example: properties/1234

pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListFirebaseLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of FirebaseLink. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listFirebaseLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listFirebaseLinksAsync(request, optionsopt) → {Object}

Equivalent to listFirebaseLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Format: properties/{property_id} Example: properties/1234

pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListFirebaseLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing FirebaseLink. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listFirebaseLinksAsync(request);
for await (const response of iterable) {
  // process response
}

listFirebaseLinksStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Format: properties/{property_id} Example: properties/1234

pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListFirebaseLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing FirebaseLink on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listFirebaseLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

Lists GoogleAdsLinks on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListGoogleAdsLinks call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListGoogleAdsLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of GoogleAdsLink. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listGoogleAdsLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGoogleAdsLinksAsync(request, optionsopt) → {Object}

Equivalent to listGoogleAdsLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListGoogleAdsLinks call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListGoogleAdsLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing GoogleAdsLink. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listGoogleAdsLinksAsync(request);
for await (const response of iterable) {
  // process response
}

listGoogleAdsLinksStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: properties/1234

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string

A page token, received from a previous ListGoogleAdsLinks call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListGoogleAdsLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing GoogleAdsLink on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listGoogleAdsLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listIosAppDataStreams(request, optionsopt) → {Promise}

Returns child iOS app data streams under the specified parent property.

iOS app data streams will be excluded if the caller does not have access. Returns an empty list if no relevant iOS app data streams are found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to list results of app streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListIosAppDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListIosAppDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of IosAppDataStream. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listIosAppDataStreamsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listIosAppDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listIosAppDataStreams, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to list results of app streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListIosAppDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListIosAppDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing IosAppDataStream. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listIosAppDataStreamsAsync(request);
for await (const response of iterable) {
  // process response
}

listIosAppDataStreamsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to list results of app streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListIosAppDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListIosAppDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing IosAppDataStream on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listIosAppDataStreamsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listMeasurementProtocolSecrets(request, optionsopt) → {Promise}

Returns child MeasurementProtocolSecrets under the specified parent Property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the parent stream. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets

pageSize number

The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.

pageToken string

A page token, received from a previous ListMeasurementProtocolSecrets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListMeasurementProtocolSecrets must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of MeasurementProtocolSecret. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listMeasurementProtocolSecretsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listMeasurementProtocolSecretsAsync(request, optionsopt) → {Object}

Equivalent to listMeasurementProtocolSecrets, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the parent stream. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets

pageSize number

The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.

pageToken string

A page token, received from a previous ListMeasurementProtocolSecrets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListMeasurementProtocolSecrets must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing MeasurementProtocolSecret. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listMeasurementProtocolSecretsAsync(request);
for await (const response of iterable) {
  // process response
}

listMeasurementProtocolSecretsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the parent stream. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets

pageSize number

The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.

pageToken string

A page token, received from a previous ListMeasurementProtocolSecrets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListMeasurementProtocolSecrets must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing MeasurementProtocolSecret on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listMeasurementProtocolSecretsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listProperties(request, optionsopt) → {Promise}

Returns child Properties under the specified parent Account.

Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
filter string

Required. An expression for filtering the results of the request. Fields eligible for filtering are: parent:(The resource name of the parent account) or firebase_project:(The id or number of the linked firebase project). Some examples of filters:

| Filter                      | Description                               |
|-----------------------------|-------------------------------------------|
| parent:accounts/123         | The account with account id: 123.         |
| firebase_project:project-id | The firebase project with id: project-id. |
| firebase_project:123        | The firebase project with number: 123.    |
pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListProperties call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

showDeleted boolean

Whether to include soft-deleted (ie: "trashed") Properties in the results. Properties can be inspected to determine whether they are deleted or not.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Property. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPropertiesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPropertiesAsync(request, optionsopt) → {Object}

Equivalent to listProperties, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
filter string

Required. An expression for filtering the results of the request. Fields eligible for filtering are: parent:(The resource name of the parent account) or firebase_project:(The id or number of the linked firebase project). Some examples of filters:

| Filter                      | Description                               |
|-----------------------------|-------------------------------------------|
| parent:accounts/123         | The account with account id: 123.         |
| firebase_project:project-id | The firebase project with id: project-id. |
| firebase_project:123        | The firebase project with number: 123.    |
pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListProperties call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

showDeleted boolean

Whether to include soft-deleted (ie: "trashed") Properties in the results. Properties can be inspected to determine whether they are deleted or not.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Property. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listPropertiesAsync(request);
for await (const response of iterable) {
  // process response
}

listPropertiesStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
filter string

Required. An expression for filtering the results of the request. Fields eligible for filtering are: parent:(The resource name of the parent account) or firebase_project:(The id or number of the linked firebase project). Some examples of filters:

| Filter                      | Description                               |
|-----------------------------|-------------------------------------------|
| parent:accounts/123         | The account with account id: 123.         |
| firebase_project:project-id | The firebase project with id: project-id. |
| firebase_project:123        | The firebase project with number: 123.    |
pageSize number

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListProperties call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

showDeleted boolean

Whether to include soft-deleted (ie: "trashed") Properties in the results. Properties can be inspected to determine whether they are deleted or not.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Property on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPropertiesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

Lists all user links on an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: accounts/1234

pageSize number

The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.

pageToken string

A page token, received from a previous ListUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListUserLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of UserLink. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listUserLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listUserLinksAsync(request, optionsopt) → {Object}

Equivalent to listUserLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: accounts/1234

pageSize number

The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.

pageToken string

A page token, received from a previous ListUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListUserLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing UserLink. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listUserLinksAsync(request);
for await (const response of iterable) {
  // process response
}

listUserLinksStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Example format: accounts/1234

pageSize number

The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.

pageToken string

A page token, received from a previous ListUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListUserLinks must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing UserLink on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listUserLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listWebDataStreams(request, optionsopt) → {Promise}

Returns child web data streams under the specified parent property.

Web data streams will be excluded if the caller does not have access. Returns an empty list if no relevant web data streams are found.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to list results of web streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListWebDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of WebDataStream. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listWebDataStreamsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listWebDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listWebDataStreams, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to list results of web streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListWebDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing WebDataStream. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listWebDataStreamsAsync(request);
for await (const response of iterable) {
  // process response
}

listWebDataStreamsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The name of the parent property. For example, to list results of web streams under the property with Id 123: "properties/123"

pageSize number

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

pageToken string

A page token, received from a previous ListWebDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebDataStreams must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing WebDataStream on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listWebDataStreamsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAccountFromAccountName(accountName) → {string}

Parse the account from Account resource.

Parameters:
Name Type Description
accountName string

A fully-qualified path representing Account resource.

Returns:
Type Description
string

A string representing the account.

matchAccountFromAccountUserLinkName(accountUserLinkName) → {string}

Parse the account from AccountUserLink resource.

Parameters:
Name Type Description
accountUserLinkName string

A fully-qualified path representing account_user_link resource.

Returns:
Type Description
string

A string representing the account.

matchAccountFromDataSharingSettingsName(dataSharingSettingsName) → {string}

Parse the account from DataSharingSettings resource.

Parameters:
Name Type Description
dataSharingSettingsName string

A fully-qualified path representing DataSharingSettings resource.

Returns:
Type Description
string

A string representing the account.

matchAccountSummaryFromAccountSummaryName(accountSummaryName) → {string}

Parse the account_summary from AccountSummary resource.

Parameters:
Name Type Description
accountSummaryName string

A fully-qualified path representing AccountSummary resource.

Returns:
Type Description
string

A string representing the account_summary.

matchAndroidAppDataStreamFromAndroidAppDataStreamName(androidAppDataStreamName) → {string}

Parse the android_app_data_stream from AndroidAppDataStream resource.

Parameters:
Name Type Description
androidAppDataStreamName string

A fully-qualified path representing AndroidAppDataStream resource.

Returns:
Type Description
string

A string representing the android_app_data_stream.

matchConversionEventFromConversionEventName(conversionEventName) → {string}

Parse the conversion_event from ConversionEvent resource.

Parameters:
Name Type Description
conversionEventName string

A fully-qualified path representing ConversionEvent resource.

Returns:
Type Description
string

A string representing the conversion_event.

matchFirebaseLinkFromFirebaseLinkName(firebaseLinkName) → {string}

Parse the firebase_link from FirebaseLink resource.

Parameters:
Name Type Description
firebaseLinkName string

A fully-qualified path representing FirebaseLink resource.

Returns:
Type Description
string

A string representing the firebase_link.

matchGoogleAdsLinkFromGoogleAdsLinkName(googleAdsLinkName) → {string}

Parse the google_ads_link from GoogleAdsLink resource.

Parameters:
Name Type Description
googleAdsLinkName string

A fully-qualified path representing GoogleAdsLink resource.

Returns:
Type Description
string

A string representing the google_ads_link.

matchIosAppDataStreamFromIosAppDataStreamName(iosAppDataStreamName) → {string}

Parse the ios_app_data_stream from IosAppDataStream resource.

Parameters:
Name Type Description
iosAppDataStreamName string

A fully-qualified path representing IosAppDataStream resource.

Returns:
Type Description
string

A string representing the ios_app_data_stream.

matchMeasurementProtocolSecretFromMeasurementProtocolSecretName(measurementProtocolSecretName) → {string}

Parse the measurement_protocol_secret from MeasurementProtocolSecret resource.

Parameters:
Name Type Description
measurementProtocolSecretName string

A fully-qualified path representing MeasurementProtocolSecret resource.

Returns:
Type Description
string

A string representing the measurement_protocol_secret.

matchPropertyFromAndroidAppDataStreamName(androidAppDataStreamName) → {string}

Parse the property from AndroidAppDataStream resource.

Parameters:
Name Type Description
androidAppDataStreamName string

A fully-qualified path representing AndroidAppDataStream resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromConversionEventName(conversionEventName) → {string}

Parse the property from ConversionEvent resource.

Parameters:
Name Type Description
conversionEventName string

A fully-qualified path representing ConversionEvent resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromCustomDimensionName(customDimensionName) → {string}

Parse the property from CustomDimension resource.

Parameters:
Name Type Description
customDimensionName string

A fully-qualified path representing CustomDimension resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromCustomMetricName(customMetricName) → {string}

Parse the property from CustomMetric resource.

Parameters:
Name Type Description
customMetricName string

A fully-qualified path representing CustomMetric resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromEnhancedMeasurementSettingsName(enhancedMeasurementSettingsName) → {string}

Parse the property from EnhancedMeasurementSettings resource.

Parameters:
Name Type Description
enhancedMeasurementSettingsName string

A fully-qualified path representing EnhancedMeasurementSettings resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromFirebaseLinkName(firebaseLinkName) → {string}

Parse the property from FirebaseLink resource.

Parameters:
Name Type Description
firebaseLinkName string

A fully-qualified path representing FirebaseLink resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromGlobalSiteTagName(globalSiteTagName) → {string}

Parse the property from GlobalSiteTag resource.

Parameters:
Name Type Description
globalSiteTagName string

A fully-qualified path representing GlobalSiteTag resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromGoogleAdsLinkName(googleAdsLinkName) → {string}

Parse the property from GoogleAdsLink resource.

Parameters:
Name Type Description
googleAdsLinkName string

A fully-qualified path representing GoogleAdsLink resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromGoogleSignalsSettingsName(googleSignalsSettingsName) → {string}

Parse the property from GoogleSignalsSettings resource.

Parameters:
Name Type Description
googleSignalsSettingsName string

A fully-qualified path representing GoogleSignalsSettings resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromIosAppDataStreamName(iosAppDataStreamName) → {string}

Parse the property from IosAppDataStream resource.

Parameters:
Name Type Description
iosAppDataStreamName string

A fully-qualified path representing IosAppDataStream resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromMeasurementProtocolSecretName(measurementProtocolSecretName) → {string}

Parse the property from MeasurementProtocolSecret resource.

Parameters:
Name Type Description
measurementProtocolSecretName string

A fully-qualified path representing MeasurementProtocolSecret resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromPropertyName(propertyName) → {string}

Parse the property from Property resource.

Parameters:
Name Type Description
propertyName string

A fully-qualified path representing Property resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromPropertyUserLinkName(propertyUserLinkName) → {string}

Parse the property from PropertyUserLink resource.

Parameters:
Name Type Description
propertyUserLinkName string

A fully-qualified path representing property_user_link resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromWebDataStreamName(webDataStreamName) → {string}

Parse the property from WebDataStream resource.

Parameters:
Name Type Description
webDataStreamName string

A fully-qualified path representing WebDataStream resource.

Returns:
Type Description
string

A string representing the property.

matchUserLinkFromAccountUserLinkName(accountUserLinkName) → {string}

Parse the user_link from AccountUserLink resource.

Parameters:
Name Type Description
accountUserLinkName string

A fully-qualified path representing account_user_link resource.

Returns:
Type Description
string

A string representing the user_link.

matchUserLinkFromPropertyUserLinkName(propertyUserLinkName) → {string}

Parse the user_link from PropertyUserLink resource.

Parameters:
Name Type Description
propertyUserLinkName string

A fully-qualified path representing property_user_link resource.

Returns:
Type Description
string

A string representing the user_link.

matchWebDataStreamFromEnhancedMeasurementSettingsName(enhancedMeasurementSettingsName) → {string}

Parse the web_data_stream from EnhancedMeasurementSettings resource.

Parameters:
Name Type Description
enhancedMeasurementSettingsName string

A fully-qualified path representing EnhancedMeasurementSettings resource.

Returns:
Type Description
string

A string representing the web_data_stream.

matchWebDataStreamFromMeasurementProtocolSecretName(measurementProtocolSecretName) → {string}

Parse the web_data_stream from MeasurementProtocolSecret resource.

Parameters:
Name Type Description
measurementProtocolSecretName string

A fully-qualified path representing MeasurementProtocolSecret resource.

Returns:
Type Description
string

A string representing the web_data_stream.

matchWebDataStreamFromWebDataStreamName(webDataStreamName) → {string}

Parse the web_data_stream from WebDataStream resource.

Parameters:
Name Type Description
webDataStreamName string

A fully-qualified path representing WebDataStream resource.

Returns:
Type Description
string

A string representing the web_data_stream.

measurementProtocolSecretPath(property, web_data_stream, measurement_protocol_secret) → {string}

Return a fully-qualified measurementProtocolSecret resource name string.

Parameters:
Name Type Description
property string
web_data_stream string
measurement_protocol_secret string
Returns:
Type Description
string

Resource name string.

propertyPath(property) → {string}

Return a fully-qualified property resource name string.

Parameters:
Name Type Description
property string
Returns:
Type Description
string

Resource name string.

propertyUserLinkPath(property, user_link) → {string}

Return a fully-qualified propertyUserLink resource name string.

Parameters:
Name Type Description
property string
user_link string
Returns:
Type Description
string

Resource name string.

provisionAccountTicket(request, optionsopt) → {Promise}

Requests a ticket for creating an account.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
account google.analytics.admin.v1alpha.Account

The account to create.

redirectUri string

Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in Developers Console as a Redirect URI

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.provisionAccountTicket(request);

searchChangeHistoryEvents(request, optionsopt) → {Promise}

Searches through all changes to an account or its children given the specified set of filters.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. The account resource for which to return change history resources.

property string <optional>

Optional. Resource name for a child property. If set, only return changes made to this property or its child resources.

resourceType Array.<number> <optional>

Optional. If set, only return changes if they are for a resource that matches at least one of these types.

action Array.<number> <optional>

Optional. If set, only return changes that match one or more of these types of actions.

actorEmail Array.<string> <optional>

Optional. If set, only return changes if they are made by a user in this list.

earliestChangeTime google.protobuf.Timestamp <optional>

Optional. If set, only return changes made after this time (inclusive).

latestChangeTime google.protobuf.Timestamp <optional>

Optional. If set, only return changes made before this time (inclusive).

pageSize number <optional>

Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string <optional>

Optional. A page token, received from a previous SearchChangeHistoryEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchChangeHistoryEvents must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of ChangeHistoryEvent. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using searchChangeHistoryEventsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

searchChangeHistoryEventsAsync(request, optionsopt) → {Object}

Equivalent to searchChangeHistoryEvents, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. The account resource for which to return change history resources.

property string <optional>

Optional. Resource name for a child property. If set, only return changes made to this property or its child resources.

resourceType Array.<number> <optional>

Optional. If set, only return changes if they are for a resource that matches at least one of these types.

action Array.<number> <optional>

Optional. If set, only return changes that match one or more of these types of actions.

actorEmail Array.<string> <optional>

Optional. If set, only return changes if they are made by a user in this list.

earliestChangeTime google.protobuf.Timestamp <optional>

Optional. If set, only return changes made after this time (inclusive).

latestChangeTime google.protobuf.Timestamp <optional>

Optional. If set, only return changes made before this time (inclusive).

pageSize number <optional>

Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string <optional>

Optional. A page token, received from a previous SearchChangeHistoryEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchChangeHistoryEvents must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ChangeHistoryEvent. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.searchChangeHistoryEventsAsync(request);
for await (const response of iterable) {
  // process response
}

searchChangeHistoryEventsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. The account resource for which to return change history resources.

property string <optional>

Optional. Resource name for a child property. If set, only return changes made to this property or its child resources.

resourceType Array.<number> <optional>

Optional. If set, only return changes if they are for a resource that matches at least one of these types.

action Array.<number> <optional>

Optional. If set, only return changes that match one or more of these types of actions.

actorEmail Array.<string> <optional>

Optional. If set, only return changes if they are made by a user in this list.

earliestChangeTime google.protobuf.Timestamp <optional>

Optional. If set, only return changes made after this time (inclusive).

latestChangeTime google.protobuf.Timestamp <optional>

Optional. If set, only return changes made before this time (inclusive).

pageSize number <optional>

Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken string <optional>

Optional. A page token, received from a previous SearchChangeHistoryEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchChangeHistoryEvents must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing ChangeHistoryEvent on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using searchChangeHistoryEventsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

updateAccount(request, optionsopt) → {Promise}

Updates an account.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
account google.analytics.admin.v1alpha.Account

Required. The account to update. The account's name field is used to identify the account.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Account. Please see the documentation for more details and examples.
Example
const [response] = await client.updateAccount(request);

updateAndroidAppDataStream(request, optionsopt) → {Promise}

Updates an android app stream on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
androidAppDataStream google.analytics.admin.v1alpha.AndroidAppDataStream

Required. The android app stream to update. The name field is used to identify the android app stream to be updated.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing AndroidAppDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.updateAndroidAppDataStream(request);

updateCustomDimension(request, optionsopt) → {Promise}

Updates a CustomDimension on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
customDimension google.analytics.admin.v1alpha.CustomDimension

The CustomDimension to update

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing CustomDimension. Please see the documentation for more details and examples.
Example
const [response] = await client.updateCustomDimension(request);

updateCustomMetric(request, optionsopt) → {Promise}

Updates a CustomMetric on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
customMetric google.analytics.admin.v1alpha.CustomMetric

The CustomMetric to update

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing CustomMetric. Please see the documentation for more details and examples.
Example
const [response] = await client.updateCustomMetric(request);

updateEnhancedMeasurementSettings(request, optionsopt) → {Promise}

Updates the singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
enhancedMeasurementSettings google.analytics.admin.v1alpha.EnhancedMeasurementSettings

Required. The settings to update. The name field is used to identify the settings to be updated.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.updateEnhancedMeasurementSettings(request);

Updates a FirebaseLink on a property

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
firebaseLink google.analytics.admin.v1alpha.FirebaseLink

Required. The Firebase link to update.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing FirebaseLink. Please see the documentation for more details and examples.
const [response] = await client.updateFirebaseLink(request);

Updates a GoogleAdsLink on a property

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
googleAdsLink google.analytics.admin.v1alpha.GoogleAdsLink

The GoogleAdsLink to update

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing GoogleAdsLink. Please see the documentation for more details and examples.
const [response] = await client.updateGoogleAdsLink(request);

updateGoogleSignalsSettings(request, optionsopt) → {Promise}

Updates Google Signals settings for a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
googleSignalsSettings google.analytics.admin.v1alpha.GoogleSignalsSettings

Required. The settings to update. The name field is used to identify the settings to be updated.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing GoogleSignalsSettings. Please see the documentation for more details and examples.
Example
const [response] = await client.updateGoogleSignalsSettings(request);

updateIosAppDataStream(request, optionsopt) → {Promise}

Updates an iOS app stream on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
iosAppDataStream google.analytics.admin.v1alpha.IosAppDataStream

Required. The iOS app stream to update. The name field is used to identify the iOS app stream to be updated.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing IosAppDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.updateIosAppDataStream(request);

updateMeasurementProtocolSecret(request, optionsopt) → {Promise}

Updates a measurement protocol secret.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
measurementProtocolSecret google.analytics.admin.v1alpha.MeasurementProtocolSecret

Required. The measurement protocol secret to update.

updateMask google.protobuf.FieldMask

The list of fields to be updated. Omitted fields will not be updated.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.updateMeasurementProtocolSecret(request);

updateProperty(request, optionsopt) → {Promise}

Updates a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
property google.analytics.admin.v1alpha.Property

Required. The property to update. The property's name field is used to identify the property to be updated.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Property. Please see the documentation for more details and examples.
Example
const [response] = await client.updateProperty(request);

Updates a user link on an account or property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
userLink google.analytics.admin.v1alpha.UserLink

Required. The user link to update.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing UserLink. Please see the documentation for more details and examples.
const [response] = await client.updateUserLink(request);

updateWebDataStream(request, optionsopt) → {Promise}

Updates a web stream on a property.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
webDataStream google.analytics.admin.v1alpha.WebDataStream

Required. The web stream to update. The name field is used to identify the web stream to be updated.

updateMask google.protobuf.FieldMask

Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing WebDataStream. Please see the documentation for more details and examples.
Example
const [response] = await client.updateWebDataStream(request);

webDataStreamPath(property, web_data_stream) → {string}

Return a fully-qualified webDataStream resource name string.

Parameters:
Name Type Description
property string
web_data_stream string
Returns:
Type Description
string

Resource name string.