Class v1alpha.AlphaAnalyticsDataClient (4.5.0)

Google Analytics reporting data service. v1alpha

Package

@google-analytics/data

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of AlphaAnalyticsDataClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: 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 AlphaAnalyticsDataClient({fallback: true}, gax); ```

Properties

alphaAnalyticsDataStub

alphaAnalyticsDataStub?: Promise<{
        [name: string]: Function;
    }>;

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

audienceListPath(property, audienceList)

audienceListPath(property: string, audienceList: string): string;

Return a fully-qualified audienceList resource name string.

Parameters
NameDescription
property string
audienceList string
Returns
TypeDescription
string

{string} Resource name string.

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request CancelOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkCreateAudienceListProgress(name)

checkCreateAudienceListProgress(name: string): Promise<LROperation<protos.google.analytics.data.v1alpha.AudienceList, protos.google.analytics.data.v1alpha.AudienceListMetadata>>;

Check the status of the long running operation returned by createAudienceList().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.analytics.data.v1alpha.AudienceList, protos.google.analytics.data.v1alpha.AudienceListMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 parent resource where this audience list will be created.
   *  Format: `properties/{property}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The audience list to create.
   */
  // const audienceList = {}

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

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

    // Run request
    const [operation] = await dataClient.createAudienceList(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateAudienceList();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

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

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createAudienceList(request, options)

createAudienceList(request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IAudienceListMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an audience list for later retrieval. This method quickly returns the audience list's resource name and initiates a long running asynchronous request to form an audience list. To list the users in an audience list, first create the audience list through this method and then send the audience resource name to the QueryAudienceList method.

See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples.

An audience list is a snapshot of the users currently in the audience at the time of audience list creation. Creating audience lists for one audience on different days will return different results as users enter and exit the audience.

Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience lists contain the users in each audience.

This method is available at beta stability at [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request ICreateAudienceListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IAudienceListMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. 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 parent resource where this audience list will be created.
   *  Format: `properties/{property}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The audience list to create.
   */
  // const audienceList = {}

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

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

    // Run request
    const [operation] = await dataClient.createAudienceList(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateAudienceList();

createAudienceList(request, options, callback)

createAudienceList(request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, options: CallOptions, callback: Callback<LROperation<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IAudienceListMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateAudienceListRequest
options CallOptions
callback Callback<LROperation<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IAudienceListMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAudienceList(request, callback)

createAudienceList(request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, callback: Callback<LROperation<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IAudienceListMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateAudienceListRequest
callback Callback<LROperation<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IAudienceListMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createRecurringAudienceList(request, options)

createRecurringAudienceList(request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IRecurringAudienceList,
        (protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest | undefined),
        {} | undefined
    ]>;

Creates a recurring audience list. Recurring audience lists produces new audience lists each day. Audience lists are users in an audience at the time of the list's creation.

A recurring audience list ensures that you have audience list based on the most recent data available for use each day. If you manually create audience list, you don't know when an audience list based on an additional day's data is available. This recurring audience list automates the creation of an audience list when an additional day's data is available. You will consume fewer quota tokens by using recurring audience list versus manually creating audience list at various times of day trying to guess when an additional day's data is ready.

This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request ICreateRecurringAudienceListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IRecurringAudienceList, (protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing RecurringAudienceList. 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 parent resource where this recurring audience list will be
   *  created. Format: `properties/{property}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The recurring audience list to create.
   */
  // const recurringAudienceList = {}

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

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

    // Run request
    const response = await dataClient.createRecurringAudienceList(request);
    console.log(response);
  }

  callCreateRecurringAudienceList();

createRecurringAudienceList(request, options, callback)

createRecurringAudienceList(request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateRecurringAudienceListRequest
options CallOptions
callback Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createRecurringAudienceList(request, callback)

createRecurringAudienceList(request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateRecurringAudienceListRequest
callback Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

getAudienceList(request, options)

getAudienceList(request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IAudienceList,
        protos.google.analytics.data.v1alpha.IGetAudienceListRequest | undefined,
        {} | undefined
    ]>;

Gets configuration metadata about a specific audience list. This method can be used to understand an audience list after it has been created.

See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples.

This method is available at beta stability at [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request IGetAudienceListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IGetAudienceListRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . 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 audience list resource name.
   *  Format: `properties/{property}/audienceLists/{audience_list}`
   */
  // const name = 'abc123'

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

  async function callGetAudienceList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dataClient.getAudienceList(request);
    console.log(response);
  }

  callGetAudienceList();

getAudienceList(request, options, callback)

getAudienceList(request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IGetAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetAudienceListRequest
options CallOptions
callback Callback<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IGetAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAudienceList(request, callback)

getAudienceList(request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IGetAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetAudienceListRequest
callback Callback<protos.google.analytics.data.v1alpha.IAudienceList, protos.google.analytics.data.v1alpha.IGetAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
NameDescription
request GetOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getRecurringAudienceList(request, options)

getRecurringAudienceList(request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IRecurringAudienceList,
        (protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | undefined),
        {} | undefined
    ]>;

Gets configuration metadata about a specific recurring audience list. This method can be used to understand a recurring audience list's state after it has been created. For example, a recurring audience list resource will generate audience list instances for each day, and this method can be used to get the resource name of the most recent audience list instance.

This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request IGetRecurringAudienceListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IRecurringAudienceList, (protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing RecurringAudienceList. 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 recurring audience list resource name.
   *  Format:
   *  `properties/{property}/recurringAudienceLists/{recurring_audience_list}`
   */
  // const name = 'abc123'

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

  async function callGetRecurringAudienceList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dataClient.getRecurringAudienceList(request);
    console.log(response);
  }

  callGetRecurringAudienceList();

getRecurringAudienceList(request, options, callback)

getRecurringAudienceList(request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetRecurringAudienceListRequest
options CallOptions
callback Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRecurringAudienceList(request, callback)

getRecurringAudienceList(request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetRecurringAudienceListRequest
callback Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listAudienceLists(request, options)

listAudienceLists(request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IAudienceList[],
        protos.google.analytics.data.v1alpha.IListAudienceListsRequest | null,
        protos.google.analytics.data.v1alpha.IListAudienceListsResponse
    ]>;

Lists all audience lists for a property. This method can be used for you to find and reuse existing audience lists rather than creating unnecessary new audience lists. The same audience can have multiple audience lists that represent the list of users that were in an audience on different days.

See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples.

This method is available at beta stability at [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request IListAudienceListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IAudienceList[], protos.google.analytics.data.v1alpha.IListAudienceListsRequest | null, protos.google.analytics.data.v1alpha.IListAudienceListsResponse ]>

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

listAudienceLists(request, options, callback)

listAudienceLists(request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, options: CallOptions, callback: PaginationCallback<protos.google.analytics.data.v1alpha.IListAudienceListsRequest, protos.google.analytics.data.v1alpha.IListAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IAudienceList>): void;
Parameters
NameDescription
request IListAudienceListsRequest
options CallOptions
callback PaginationCallback<protos.google.analytics.data.v1alpha.IListAudienceListsRequest, protos.google.analytics.data.v1alpha.IListAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IAudienceList>
Returns
TypeDescription
void

listAudienceLists(request, callback)

listAudienceLists(request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, callback: PaginationCallback<protos.google.analytics.data.v1alpha.IListAudienceListsRequest, protos.google.analytics.data.v1alpha.IListAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IAudienceList>): void;
Parameters
NameDescription
request IListAudienceListsRequest
callback PaginationCallback<protos.google.analytics.data.v1alpha.IListAudienceListsRequest, protos.google.analytics.data.v1alpha.IListAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IAudienceList>
Returns
TypeDescription
void

listAudienceListsAsync(request, options)

listAudienceListsAsync(request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, options?: CallOptions): AsyncIterable<protos.google.analytics.data.v1alpha.IAudienceList>;

Equivalent to listAudienceLists, but returns an iterable object.

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

Parameters
NameDescription
request IListAudienceListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.analytics.data.v1alpha.IAudienceList>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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. All audience lists for this property will be listed in the
   *  response. Format: `properties/{property}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of audience lists to return. The service may
   *  return fewer than this value. If unspecified, at most 200 audience lists
   *  will be returned. The maximum value is 1000 (higher values will be coerced
   *  to the maximum).
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous `ListAudienceLists` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListAudienceLists` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

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

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

  callListAudienceLists();

listAudienceListsStream(request, options)

listAudienceListsStream(request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListAudienceListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listAudienceListsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listRecurringAudienceLists(request, options)

listRecurringAudienceLists(request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IRecurringAudienceList[],
        protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest | null,
        protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse
    ]>;

Lists all recurring audience lists for a property. This method can be used for you to find and reuse existing recurring audience lists rather than creating unnecessary new recurring audience lists. The same audience can have multiple recurring audience lists that represent different dimension combinations; for example, just the dimension deviceId or both the dimensions deviceId and userId.

This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request IListRecurringAudienceListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IRecurringAudienceList[], protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest | null, protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse ]>

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

listRecurringAudienceLists(request, options, callback)

listRecurringAudienceLists(request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, options: CallOptions, callback: PaginationCallback<protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void;
Parameters
NameDescription
request IListRecurringAudienceListsRequest
options CallOptions
callback PaginationCallback<protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IRecurringAudienceList>
Returns
TypeDescription
void

listRecurringAudienceLists(request, callback)

listRecurringAudienceLists(request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, callback: PaginationCallback<protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void;
Parameters
NameDescription
request IListRecurringAudienceListsRequest
callback PaginationCallback<protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse | null | undefined, protos.google.analytics.data.v1alpha.IRecurringAudienceList>
Returns
TypeDescription
void

listRecurringAudienceListsAsync(request, options)

listRecurringAudienceListsAsync(request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, options?: CallOptions): AsyncIterable<protos.google.analytics.data.v1alpha.IRecurringAudienceList>;

Equivalent to listRecurringAudienceLists, but returns an iterable object.

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

Parameters
NameDescription
request IListRecurringAudienceListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.analytics.data.v1alpha.IRecurringAudienceList>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing RecurringAudienceList. 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. All recurring audience lists for this property will be listed in
   *  the response. Format: `properties/{property}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of recurring audience lists to return. The
   *  service may return fewer than this value. If unspecified, at most 200
   *  recurring audience lists will be returned. The maximum value is 1000
   *  (higher values will be coerced to the maximum).
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent
   *  page.
   *  When paginating, all other parameters provided to
   *  `ListRecurringAudienceLists` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

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

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

  callListRecurringAudienceLists();

listRecurringAudienceListsStream(request, options)

listRecurringAudienceListsStream(request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListRecurringAudienceListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing RecurringAudienceList 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 listRecurringAudienceListsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAudienceListFromAudienceListName(audienceListName)

matchAudienceListFromAudienceListName(audienceListName: string): string | number;

Parse the audience_list from AudienceList resource.

Parameter
NameDescription
audienceListName string

A fully-qualified path representing AudienceList resource.

Returns
TypeDescription
string | number

{string} A string representing the audience_list.

matchPropertyFromAudienceListName(audienceListName)

matchPropertyFromAudienceListName(audienceListName: string): string | number;

Parse the property from AudienceList resource.

Parameter
NameDescription
audienceListName string

A fully-qualified path representing AudienceList resource.

Returns
TypeDescription
string | number

{string} A string representing the property.

matchPropertyFromPropertyName(propertyName)

matchPropertyFromPropertyName(propertyName: string): string | number;

Parse the property from Property resource.

Parameter
NameDescription
propertyName string

A fully-qualified path representing Property resource.

Returns
TypeDescription
string | number

{string} A string representing the property.

matchPropertyFromRecurringAudienceListName(recurringAudienceListName)

matchPropertyFromRecurringAudienceListName(recurringAudienceListName: string): string | number;

Parse the property from RecurringAudienceList resource.

Parameter
NameDescription
recurringAudienceListName string

A fully-qualified path representing RecurringAudienceList resource.

Returns
TypeDescription
string | number

{string} A string representing the property.

matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName)

matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName: string): string | number;

Parse the recurring_audience_list from RecurringAudienceList resource.

Parameter
NameDescription
recurringAudienceListName string

A fully-qualified path representing RecurringAudienceList resource.

Returns
TypeDescription
string | number

{string} A string representing the recurring_audience_list.

propertyPath(property)

propertyPath(property: string): string;

Return a fully-qualified property resource name string.

Parameter
NameDescription
property string
Returns
TypeDescription
string

{string} Resource name string.

queryAudienceList(request, options)

queryAudienceList(request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IQueryAudienceListResponse,
        (protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | undefined),
        {} | undefined
    ]>;

Retrieves an audience list of users. After creating an audience, the users are not immediately available for listing. First, a request to CreateAudienceList is necessary to create an audience list of users, and then second, this method is used to retrieve the users in the audience list.

See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples.

Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572.

This method is available at beta stability at [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request IQueryAudienceListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, (protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing QueryAudienceListResponse. 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 name of the audience list to retrieve users from.
   *  Format: `properties/{property}/audienceLists/{audience_list}`
   */
  // const name = 'abc123'
  /**
   *  Optional. The row count of the start row. The first row is counted as row
   *  0.
   *  When paging, the first request does not specify offset; or equivalently,
   *  sets offset to 0; the first request returns the first `limit` of rows. The
   *  second request sets offset to the `limit` of the first request; the second
   *  request returns the second `limit` of rows.
   *  To learn more about this pagination parameter, see
   *  Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
   */
  // const offset = 1234
  /**
   *  Optional. The number of rows to return. If unspecified, 10,000 rows are
   *  returned. The API returns a maximum of 250,000 rows per request, no matter
   *  how many you ask for. `limit` must be positive.
   *  The API can also return fewer rows than the requested `limit`, if there
   *  aren't as many dimension values as the `limit`.
   *  To learn more about this pagination parameter, see
   *  Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
   */
  // const limit = 1234

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

  async function callQueryAudienceList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dataClient.queryAudienceList(request);
    console.log(response);
  }

  callQueryAudienceList();

queryAudienceList(request, options, callback)

queryAudienceList(request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IQueryAudienceListRequest
options CallOptions
callback Callback<protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

queryAudienceList(request, callback)

queryAudienceList(request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IQueryAudienceListRequest
callback Callback<protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

recurringAudienceListPath(property, recurringAudienceList)

recurringAudienceListPath(property: string, recurringAudienceList: string): string;

Return a fully-qualified recurringAudienceList resource name string.

Parameters
NameDescription
property string
recurringAudienceList string
Returns
TypeDescription
string

{string} Resource name string.

runFunnelReport(request, options)

runFunnelReport(request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.IRunFunnelReportResponse,
        protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | undefined,
        {} | undefined
    ]>;

Returns a customized funnel report of your Google Analytics event data. The data returned from the API is as a table with columns for the requested dimensions and metrics.

Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys. To learn more, see [GA4 Funnel Explorations](https://support.google.com/analytics/answer/9327974).

This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Data API Funnel Reporting Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform).

Parameters
NameDescription
request IRunFunnelReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing RunFunnelReportResponse. 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.
   */
  /**
   *  Optional. A Google Analytics GA4 property identifier whose events are
   *  tracked. Specified in the URL path and not the body. To learn more, see
   *  where to find your Property
   *  ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
   *  Within a batch request, this property should either be unspecified or
   *  consistent with the batch-level property.
   *  Example: properties/1234
   */
  // const property = 'abc123'
  /**
   *  Optional. Date ranges of data to read. If multiple date ranges are
   *  requested, each response row will contain a zero based date range index. If
   *  two date ranges overlap, the event data for the overlapping days is
   *  included in the response rows for both date ranges.
   */
  // const dateRanges = [1,2,3,4]
  /**
   *  Optional. The configuration of this request's funnel. This funnel
   *  configuration is required.
   */
  // const funnel = {}
  /**
   *  Optional. If specified, this breakdown adds a dimension to the funnel table
   *  sub report response. This breakdown dimension expands each funnel step to
   *  the unique values of the breakdown dimension. For example, a breakdown by
   *  the `deviceCategory` dimension will create rows for `mobile`, `tablet`,
   *  `desktop`, and the total.
   */
  // const funnelBreakdown = {}
  /**
   *  Optional. If specified, next action adds a dimension to the funnel
   *  visualization sub report response. This next action dimension expands each
   *  funnel step to the unique values of the next action. For example a next
   *  action of the `eventName` dimension will create rows for several events
   *  (for example `session_start` & `click`) and the total.
   *  Next action only supports `eventName` and most Page / Screen dimensions
   *  like `pageTitle` and `pagePath`.
   */
  // const funnelNextAction = {}
  /**
   *  Optional. The funnel visualization type controls the dimensions present in
   *  the funnel visualization sub report response. If not specified,
   *  `STANDARD_FUNNEL` is used.
   */
  // const funnelVisualizationType = {}
  /**
   *  Optional. The configurations of segments. Segments are subsets of a
   *  property's data. In a funnel report with segments, the funnel is evaluated
   *  in each segment.
   *  Each segment specified in this request
   *  produces a separate row in the response; in the response, each segment
   *  identified by its name.
   *  The segments parameter is optional. Requests are limited to 4 segments.
   */
  // const segments = [1,2,3,4]
  /**
   *  Optional. The number of rows to return. If unspecified, 10,000 rows are
   *  returned. The API returns a maximum of 250,000 rows per request, no matter
   *  how many you ask for. `limit` must be positive.
   *  The API can also return fewer rows than the requested `limit`, if there
   *  aren't as many dimension values as the `limit`.
   */
  // const limit = 1234
  /**
   *  Optional. Dimension filters allow you to ask for only specific dimension
   *  values in the report. To learn more, see Creating a Report: Dimension
   *  Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
   *  for examples. Metrics cannot be used in this filter.
   */
  // const dimensionFilter = {}
  /**
   *  Optional. Toggles whether to return the current state of this Analytics
   *  Property's quota. Quota is returned in PropertyQuota (#PropertyQuota).
   */
  // const returnPropertyQuota = true

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

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

    // Run request
    const response = await dataClient.runFunnelReport(request);
    console.log(response);
  }

  callRunFunnelReport();

runFunnelReport(request, options, callback)

runFunnelReport(request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRunFunnelReportRequest
options CallOptions
callback Callback<protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

runFunnelReport(request, callback)

runFunnelReport(request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRunFunnelReportRequest
callback Callback<protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, protos.google.analytics.data.v1alpha.IRunFunnelReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

sheetExportAudienceList(request, options)

sheetExportAudienceList(request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, options?: CallOptions): Promise<[
        protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse,
        (protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | undefined),
        {} | undefined
    ]>;

Exports an audience list of users to a Google Sheet. After creating an audience, the users are not immediately available for listing. First, a request to CreateAudienceList is necessary to create an audience list of users, and then second, this method is used to export those users in the audience list to a Google Sheet.

See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples.

Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572.

This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.

Parameters
NameDescription
request ISheetExportAudienceListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, (protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing SheetExportAudienceListResponse. 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 name of the audience list to retrieve users from.
   *  Format: `properties/{property}/audienceLists/{audience_list}`
   */
  // const name = 'abc123'
  /**
   *  Optional. The row count of the start row. The first row is counted as row
   *  0.
   *  When paging, the first request does not specify offset; or equivalently,
   *  sets offset to 0; the first request returns the first `limit` of rows. The
   *  second request sets offset to the `limit` of the first request; the second
   *  request returns the second `limit` of rows.
   *  To learn more about this pagination parameter, see
   *  Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
   */
  // const offset = 1234
  /**
   *  Optional. The number of rows to return. If unspecified, 10,000 rows are
   *  returned. The API returns a maximum of 250,000 rows per request, no matter
   *  how many you ask for. `limit` must be positive.
   *  The API can also return fewer rows than the requested `limit`, if there
   *  aren't as many dimension values as the `limit`.
   *  To learn more about this pagination parameter, see
   *  Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
   */
  // const limit = 1234

  // Imports the Data library
  const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha;

  // Instantiates a client
  const dataClient = new AlphaAnalyticsDataClient();

  async function callSheetExportAudienceList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dataClient.sheetExportAudienceList(request);
    console.log(response);
  }

  callSheetExportAudienceList();

sheetExportAudienceList(request, options, callback)

sheetExportAudienceList(request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISheetExportAudienceListRequest
options CallOptions
callback Callback<protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

sheetExportAudienceList(request, callback)

sheetExportAudienceList(request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISheetExportAudienceListRequest
callback Callback<protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void