AnalyticsAdminServiceClient

AnalyticsAdminServiceClient

Service Interface for the Analytics Admin API (GA4).

Constructor

new AnalyticsAdminServiceClient(optionsopt, gaxInstanceopt)

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/1.1 REST mode. For more information, please check the documentation.

gaxInstance gax <optional>

loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new AnalyticsAdminServiceClient({fallback: true}, gax);

Members

apiEndpoint

The DNS address for this API service.

apiEndpoint

The DNS address for this API service - same as servicePath.

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.

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.

customDimensionPath(property, custom_dimension) → {string}

Return a fully-qualified customDimension resource name string.

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

Resource name string.

customMetricPath(property, custom_metric) → {string}

Return a fully-qualified customMetric resource name string.

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

Resource name string.

dataRetentionSettingsPath(property) → {string}

Return a fully-qualified dataRetentionSettings 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.

dataStreamPath(property, data_stream) → {string}

Return a fully-qualified dataStream resource name string.

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

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

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.

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.

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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)
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListAccountSummaries() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = adminClient.listAccountSummariesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListAccountSummaries();

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.

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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)
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'
  /**
   *  Whether to include soft-deleted (ie: "trashed") Accounts in the
   *  results. Accounts can be inspected to determine whether they are deleted or
   *  not.
   */
  // const showDeleted = true

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListAccounts() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = adminClient.listAccountsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListAccounts();

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.

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the parent property.
   *  Example: 'properties/123'
   */
  // const parent = 'abc123'
  /**
   *  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)
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListConversionEvents() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listConversionEventsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListConversionEvents();

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.

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example format: properties/1234
   */
  // const parent = 'abc123'
  /**
   *  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).
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListCustomDimensions() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listCustomDimensionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCustomDimensions();

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.

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example format: properties/1234
   */
  // const parent = 'abc123'
  /**
   *  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).
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListCustomMetrics() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listCustomMetricsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCustomMetrics();

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.

listDataStreamsAsync(request, optionsopt) → {Object}

Equivalent to listDataStreams, 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 ListDataStreams call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListDataStreams 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 DataStream. 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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example format: properties/1234
   */
  // const parent = 'abc123'
  /**
   *  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).
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListDataStreams` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListDataStreams` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListDataStreams() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listDataStreamsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListDataStreams();

listDataStreamsStream(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 ListDataStreams call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListDataStreams 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 DataStream 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 listDataStreamsAsync() 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 ListFirebaseLinks 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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Format: properties/{property_id}
   *  Example: properties/1234
   */
  // const parent = 'abc123'
  /**
   *  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)
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListFirebaseLinks` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListFirebaseLinks` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListFirebaseLinks() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listFirebaseLinksAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListFirebaseLinks();

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 ListFirebaseLinks 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.

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Example format: properties/1234
   */
  // const parent = 'abc123'
  /**
   *  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).
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListGoogleAdsLinks() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listGoogleAdsLinksAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListGoogleAdsLinks();

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.

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. Format: properties/{property}/dataStreams/{dataStream}/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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the parent stream.
   *  Format:
   *  properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListMeasurementProtocolSecrets() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = adminClient.listMeasurementProtocolSecretsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListMeasurementProtocolSecrets();

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. Format: properties/{property}/dataStreams/{dataStream}/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.

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/property) or ancestor:(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.       |
| parent:properties/123       | The property with property id: 123.       |
| ancestor: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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. An expression for filtering the results of the request.
   *  Fields eligible for filtering are:
   *  `parent:`(The resource name of the parent account/property) or
   *  `ancestor:`(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.       |
   *  | parent:properties/123       | The property with property id: 123.       |
   *  | ancestor: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.    |
   *  ```
   */
  // const filter = 'abc123'
  /**
   *  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)
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'
  /**
   *  Whether to include soft-deleted (ie: "trashed") Properties in the
   *  results. Properties can be inspected to determine whether they are deleted
   *  or not.
   */
  // const showDeleted = true

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callListProperties() {
    // Construct request
    const request = {
      filter,
    };

    // Run request
    const iterable = adminClient.listPropertiesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListProperties();

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/property) or ancestor:(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.       |
| parent:properties/123       | The property with property id: 123.       |
| ancestor: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.

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.

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.

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.

matchCustomDimensionFromCustomDimensionName(customDimensionName) → {string}

Parse the custom_dimension from CustomDimension resource.

Parameters:
Name Type Description
customDimensionName string

A fully-qualified path representing CustomDimension resource.

Returns:
Type Description
string

A string representing the custom_dimension.

matchCustomMetricFromCustomMetricName(customMetricName) → {string}

Parse the custom_metric from CustomMetric resource.

Parameters:
Name Type Description
customMetricName string

A fully-qualified path representing CustomMetric resource.

Returns:
Type Description
string

A string representing the custom_metric.

matchDataStreamFromDataStreamName(dataStreamName) → {string}

Parse the data_stream from DataStream resource.

Parameters:
Name Type Description
dataStreamName string

A fully-qualified path representing DataStream resource.

Returns:
Type Description
string

A string representing the data_stream.

matchDataStreamFromMeasurementProtocolSecretName(measurementProtocolSecretName) → {string}

Parse the 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 data_stream.

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.

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.

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.

matchPropertyFromDataRetentionSettingsName(dataRetentionSettingsName) → {string}

Parse the property from DataRetentionSettings resource.

Parameters:
Name Type Description
dataRetentionSettingsName string

A fully-qualified path representing DataRetentionSettings resource.

Returns:
Type Description
string

A string representing the property.

matchPropertyFromDataStreamName(dataStreamName) → {string}

Parse the property from DataStream resource.

Parameters:
Name Type Description
dataStreamName string

A fully-qualified path representing DataStream 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.

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.

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.

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

Return a fully-qualified measurementProtocolSecret resource name string.

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

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
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The account resource for which to return change history
   *  resources.
   */
  // const account = 'abc123'
  /**
   *  Optional. Resource name for a child property. If set, only return changes
   *  made to this property or its child resources.
   */
  // const property = 'abc123'
  /**
   *  Optional. If set, only return changes if they are for a resource that
   *  matches at least one of these types.
   */
  // const resourceType = [1,2,3,4]
  /**
   *  Optional. If set, only return changes that match one or more of these types
   *  of actions.
   */
  // const action = [1,2,3,4]
  /**
   *  Optional. If set, only return changes if they are made by a user in this
   *  list.
   */
  // const actorEmail = ['abc','def']
  /**
   *  Optional. If set, only return changes made after this time (inclusive).
   */
  // const earliestChangeTime = {}
  /**
   *  Optional. If set, only return changes made before this time (inclusive).
   */
  // const latestChangeTime = {}
  /**
   *  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).
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;

  // Instantiates a client
  const adminClient = new AnalyticsAdminServiceClient();

  async function callSearchChangeHistoryEvents() {
    // Construct request
    const request = {
      account,
    };

    // Run request
    const iterable = adminClient.searchChangeHistoryEventsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callSearchChangeHistoryEvents();

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.