AnalyticsAdminServiceClient

AnalyticsAdminServiceClient

Service Interface for the Analytics Admin API (App+Web).

Constructor

new AnalyticsAdminServiceClient(optionsopt)

Construct an instance of AnalyticsAdminServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. See the subsequent parameters for more details.

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.

Members

(static) apiEndpoint

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

(static) port

The port for this API service.

(static) scopes

The scopes needed to make gRPC calls for every method defined in this service.

(static) 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

accountUserLinkPath(account, user_link) → {string}

Return a fully-qualified accountUserLink resource name string.

Parameters:
Name Type Description
account string
user_link 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

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.

auditUserLinksAsync(request, optionsopt) → {Object}

Equivalent to auditUserLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

auditUserLinksStream(request, optionsopt) → {Stream}

Equivalent to auditUserLinks, but returns a NodeJS Stream object.

This fetches the paged responses for auditUserLinks continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

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 notify_new_users is set, then email new users that they've been given permissions on the resource.

requests Array.<number>

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.

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>

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.

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.

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>

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.

close()

Terminate the GRPC channel and close the client.

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

createAndroidAppDataStream(request, optionsopt) → {Promise}

Creates an android app 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
androidAppDataStream google.analytics.admin.v1alpha.AndroidAppDataStream

Required. The android app stream to create.

parent string

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

options object <optional>

Call options. See CallOptions for more details.

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.

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.

createIosAppDataStream(request, optionsopt) → {Promise}

Creates an iOS app data 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
iosAppDataStream google.analytics.admin.v1alpha.IosAppDataStream

Required. The iOS app data stream to create.

parent string

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

options object <optional>

Call options. See CallOptions for more details.

createProperty(request, optionsopt) → {Promise}

Creates an "App+Web" 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.

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 notify_new_user is set, then email new user that they've been given permissions on the resource.

userLink google.analytics.admin.v1alpha.UserLink

Required. The user link to create.

options object <optional>

Call options. See CallOptions for more details.

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.

dataSharingSettingsPath(account) → {string}

Return a fully-qualified dataSharingSettings resource name string.

Parameters:
Name Type Description
account 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.

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.

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.

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.

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.

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 App+Web 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.

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.

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.

enhancedMeasurementSettingsPath(property, web_data_stream) → {string}

Return a fully-qualified enhancedMeasurementSettings resource name string.

Parameters:
Name Type Description
property string
web_data_stream string

firebaseLinkPath(property, firebase_link) → {string}

Return a fully-qualified firebaseLink resource name string.

Parameters:
Name Type Description
property string
firebase_link string

getAccount(request, optionsopt) → {Promise}

Lookup for a single Account. Throws "Target not found" if no such account found, or if caller does not have permissions to access it.

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.

getAndroidAppDataStream(request, optionsopt) → {Promise}

Lookup for a single AndroidAppDataStream

Throws "Target not found" if no such android app data stream found, or if the caller does not have permissions to access it.

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.

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.

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.

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.

getIosAppDataStream(request, optionsopt) → {Promise}

Lookup for a single IosAppDataStream

Throws "Target not found" if no such iOS app data stream found, or if the caller does not have permissions to access it.

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.

getProjectId(callback)

Return the project ID used by this class.

Parameters:
Name Type Description
callback function

the callback to be called with the current project Id.

getProperty(request, optionsopt) → {Promise}

Lookup for a single "App+Web" Property.

Throws "Target not found" if no such property found, if property is not of the type "App+Web", or if caller does not have permissions to access it.

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.

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.

getWebDataStream(request, optionsopt) → {Promise}

Lookup for a single WebDataStream

Throws "Target not found" if no such web data stream found, or if the caller does not have permissions to access it.

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.

globalSiteTagPath(property) → {string}

Return a fully-qualified globalSiteTag resource name string.

Parameters:
Name Type Description
property 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

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.

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

listAccounts(request, optionsopt) → {Promise}

Returns all accounts accessible by the caller.

Note that these accounts might not currently have App+Web 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.

listAccountsAsync(request, optionsopt) → {Object}

Equivalent to listAccounts, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listAccountsStream(request, optionsopt) → {Stream}

Equivalent to listAccounts, but returns a NodeJS Stream object.

This fetches the paged responses for listAccounts continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

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.

listAndroidAppDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listAndroidAppDataStreams, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listAndroidAppDataStreamsStream(request, optionsopt) → {Stream}

Equivalent to listAndroidAppDataStreams, but returns a NodeJS Stream object.

This fetches the paged responses for listAndroidAppDataStreams continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

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

options object <optional>

Call options. See CallOptions for more details.

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.

listGoogleAdsLinksAsync(request, optionsopt) → {Object}

Equivalent to listGoogleAdsLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listGoogleAdsLinksStream(request, optionsopt) → {Stream}

Equivalent to listGoogleAdsLinks, but returns a NodeJS Stream object.

This fetches the paged responses for listGoogleAdsLinks continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

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.

listIosAppDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listIosAppDataStreams, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listIosAppDataStreamsStream(request, optionsopt) → {Stream}

Equivalent to listIosAppDataStreams, but returns a NodeJS Stream object.

This fetches the paged responses for listIosAppDataStreams continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

listProperties(request, optionsopt) → {Promise}

Returns child Properties under the specified parent Account.

Only "App+Web" 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.

listPropertiesAsync(request, optionsopt) → {Object}

Equivalent to listProperties, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listPropertiesStream(request, optionsopt) → {Stream}

Equivalent to listProperties, but returns a NodeJS Stream object.

This fetches the paged responses for listProperties continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

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.

listUserLinksAsync(request, optionsopt) → {Object}

Equivalent to listUserLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listUserLinksStream(request, optionsopt) → {Stream}

Equivalent to listUserLinks, but returns a NodeJS Stream object.

This fetches the paged responses for listUserLinks continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

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.

listWebDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listWebDataStreams, but returns an iterable object.

for-await-of syntax is used with the iterable to recursively get response element 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.

listWebDataStreamsStream(request, optionsopt) → {Stream}

Equivalent to listWebDataStreams, but returns a NodeJS Stream object.

This fetches the paged responses for listWebDataStreams continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

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.

See:

matchAccountFromAccountName(accountName) → {string}

Parse the account from Account resource.

Parameters:
Name Type Description
accountName string

A fully-qualified path representing Account resource.

matchAccountFromAccountUserLinkName(accountUserLinkName) → {string}

Parse the account from AccountUserLink resource.

Parameters:
Name Type Description
accountUserLinkName string

A fully-qualified path representing account_user_link resource.

matchAccountFromDataSharingSettingsName(dataSharingSettingsName) → {string}

Parse the account from DataSharingSettings resource.

Parameters:
Name Type Description
dataSharingSettingsName string

A fully-qualified path representing DataSharingSettings resource.

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.

matchFirebaseLinkFromFirebaseLinkName(firebaseLinkName) → {string}

Parse the firebase_link from FirebaseLink resource.

Parameters:
Name Type Description
firebaseLinkName string

A fully-qualified path representing FirebaseLink resource.

matchGoogleAdsLinkFromGoogleAdsLinkName(googleAdsLinkName) → {string}

Parse the google_ads_link from GoogleAdsLink resource.

Parameters:
Name Type Description
googleAdsLinkName string

A fully-qualified path representing GoogleAdsLink resource.

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.

matchPropertyFromAndroidAppDataStreamName(androidAppDataStreamName) → {string}

Parse the property from AndroidAppDataStream resource.

Parameters:
Name Type Description
androidAppDataStreamName string

A fully-qualified path representing AndroidAppDataStream resource.

matchPropertyFromEnhancedMeasurementSettingsName(enhancedMeasurementSettingsName) → {string}

Parse the property from EnhancedMeasurementSettings resource.

Parameters:
Name Type Description
enhancedMeasurementSettingsName string

A fully-qualified path representing EnhancedMeasurementSettings resource.

matchPropertyFromFirebaseLinkName(firebaseLinkName) → {string}

Parse the property from FirebaseLink resource.

Parameters:
Name Type Description
firebaseLinkName string

A fully-qualified path representing FirebaseLink resource.

matchPropertyFromGlobalSiteTagName(globalSiteTagName) → {string}

Parse the property from GlobalSiteTag resource.

Parameters:
Name Type Description
globalSiteTagName string

A fully-qualified path representing GlobalSiteTag resource.

matchPropertyFromGoogleAdsLinkName(googleAdsLinkName) → {string}

Parse the property from GoogleAdsLink resource.

Parameters:
Name Type Description
googleAdsLinkName string

A fully-qualified path representing GoogleAdsLink resource.

matchPropertyFromIosAppDataStreamName(iosAppDataStreamName) → {string}

Parse the property from IosAppDataStream resource.

Parameters:
Name Type Description
iosAppDataStreamName string

A fully-qualified path representing IosAppDataStream resource.

matchPropertyFromPropertyName(propertyName) → {string}

Parse the property from Property resource.

Parameters:
Name Type Description
propertyName string

A fully-qualified path representing Property resource.

matchPropertyFromPropertyUserLinkName(propertyUserLinkName) → {string}

Parse the property from PropertyUserLink resource.

Parameters:
Name Type Description
propertyUserLinkName string

A fully-qualified path representing property_user_link resource.

matchPropertyFromWebDataStreamName(webDataStreamName) → {string}

Parse the property from WebDataStream resource.

Parameters:
Name Type Description
webDataStreamName string

A fully-qualified path representing WebDataStream resource.

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.

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.

matchWebDataStreamFromEnhancedMeasurementSettingsName(enhancedMeasurementSettingsName) → {string}

Parse the web_data_stream from EnhancedMeasurementSettings resource.

Parameters:
Name Type Description
enhancedMeasurementSettingsName string

A fully-qualified path representing EnhancedMeasurementSettings resource.

matchWebDataStreamFromWebDataStreamName(webDataStreamName) → {string}

Parse the web_data_stream from WebDataStream resource.

Parameters:
Name Type Description
webDataStreamName string

A fully-qualified path representing WebDataStream resource.

propertyPath(property) → {string}

Return a fully-qualified property resource name string.

Parameters:
Name Type Description
property string

propertyUserLinkPath(property, user_link) → {string}

Return a fully-qualified propertyUserLink resource name string.

Parameters:
Name Type Description
property string
user_link 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.

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

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

options object <optional>

Call options. See CallOptions for more details.

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

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

options object <optional>

Call options. See CallOptions for more details.

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

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

options object <optional>

Call options. See CallOptions for more details.

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

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

options object <optional>

Call options. See CallOptions for more details.

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

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

options object <optional>

Call options. See CallOptions for more details.

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

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

options object <optional>

Call options. See CallOptions for more details.

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

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

options object <optional>

Call options. See CallOptions for more details.

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.

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

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

options object <optional>

Call options. See CallOptions for more details.

webDataStreamPath(property, web_data_stream) → {string}

Return a fully-qualified webDataStream resource name string.

Parameters:
Name Type Description
property string
web_data_stream string