Service Interface for the Analytics Admin API (GA4). v1beta
Package
@google-analytics/admin
Constructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of AnalyticsAdminServiceClient.
Parameters |
Name |
Description |
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 AnalyticsAdminServiceClient({fallback: true}, gax); ```
|
Properties
analyticsAdminServiceStub
analyticsAdminServiceStub?: 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
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
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
accountPath(account)
accountPath(account: string): string;
Return a fully-qualified account resource name string.
Parameter |
Name |
Description |
account |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
accountSummaryPath(accountSummary)
accountSummaryPath(accountSummary: string): string;
Return a fully-qualified accountSummary resource name string.
Parameter |
Name |
Description |
accountSummary |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
acknowledgeUserDataCollection(request, options)
acknowledgeUserDataCollection(request?: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse,
(protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest | undefined),
{} | undefined
]>;
Acknowledges the terms of user data collection for the specified property.
This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.
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 property for which to acknowledge user data collection.
*/
// const property = 'abc123'
/**
* Required. An acknowledgement that the caller of this method understands the
* terms of user data collection.
* This field must contain the exact value:
* "I acknowledge that I have the necessary privacy disclosures and rights
* from my end users for the collection and processing of their data,
* including the association of such data with the visitation information
* Google Analytics collects from my site and/or app property."
*/
// const acknowledgement = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callAcknowledgeUserDataCollection() {
// Construct request
const request = {
property,
acknowledgement,
};
// Run request
const response = await adminClient.acknowledgeUserDataCollection(request);
console.log(response);
}
callAcknowledgeUserDataCollection();
acknowledgeUserDataCollection(request, options, callback)
acknowledgeUserDataCollection(request: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
acknowledgeUserDataCollection(request, callback)
acknowledgeUserDataCollection(request: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, callback: Callback<protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomDimension(request, options)
archiveCustomDimension(request?: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest | undefined),
{} | undefined
]>;
Archives a CustomDimension on a property.
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 CustomDimension to archive.
* Example format: properties/1234/customDimensions/5678
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callArchiveCustomDimension() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.archiveCustomDimension(request);
console.log(response);
}
callArchiveCustomDimension();
archiveCustomDimension(request, options, callback)
archiveCustomDimension(request: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomDimension(request, callback)
archiveCustomDimension(request: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomMetric(request, options)
archiveCustomMetric(request?: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest | undefined),
{} | undefined
]>;
Archives a CustomMetric on a property.
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 CustomMetric to archive.
* Example format: properties/1234/customMetrics/5678
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callArchiveCustomMetric() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.archiveCustomMetric(request);
console.log(response);
}
callArchiveCustomMetric();
archiveCustomMetric(request, options, callback)
archiveCustomMetric(request: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomMetric(request, callback)
archiveCustomMetric(request: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
close()
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<void> |
{Promise} A promise that resolves when the client is closed.
|
conversionEventPath(property, conversionEvent)
conversionEventPath(property: string, conversionEvent: string): string;
Return a fully-qualified conversionEvent resource name string.
Parameters |
Name |
Description |
property |
string
|
conversionEvent |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
createConversionEvent(request, options)
createConversionEvent(request?: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IConversionEvent,
(protos.google.analytics.admin.v1beta.ICreateConversionEventRequest | undefined),
{} | undefined
]>;
Deprecated: Use CreateKeyEvent
instead. Creates a conversion event with the specified attributes.
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 conversion event to create.
*/
// const conversionEvent = {}
/**
* Required. The resource name of the parent property where this conversion
* event will be created. Format: properties/123
*/
// const parent = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateConversionEvent() {
// Construct request
const request = {
conversionEvent,
parent,
};
// Run request
const response = await adminClient.createConversionEvent(request);
console.log(response);
}
callCreateConversionEvent();
createConversionEvent(request, options, callback)
createConversionEvent(request: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IConversionEvent, protos.google.analytics.admin.v1beta.ICreateConversionEventRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createConversionEvent(request, callback)
createConversionEvent(request: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, callback: Callback<protos.google.analytics.admin.v1beta.IConversionEvent, protos.google.analytics.admin.v1beta.ICreateConversionEventRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createCustomDimension(request, options)
createCustomDimension(request?: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.ICustomDimension,
(protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest | undefined),
{} | undefined
]>;
Creates a CustomDimension.
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'
/**
* Required. The CustomDimension to create.
*/
// const customDimension = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateCustomDimension() {
// Construct request
const request = {
parent,
customDimension,
};
// Run request
const response = await adminClient.createCustomDimension(request);
console.log(response);
}
callCreateCustomDimension();
createCustomDimension(request, options, callback)
createCustomDimension(request: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.ICustomDimension, protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createCustomDimension(request, callback)
createCustomDimension(request: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, callback: Callback<protos.google.analytics.admin.v1beta.ICustomDimension, protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createCustomMetric(request, options)
createCustomMetric(request?: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.ICustomMetric,
(protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest | undefined),
{} | undefined
]>;
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'
/**
* Required. The CustomMetric to create.
*/
// const customMetric = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateCustomMetric() {
// Construct request
const request = {
parent,
customMetric,
};
// Run request
const response = await adminClient.createCustomMetric(request);
console.log(response);
}
callCreateCustomMetric();
createCustomMetric(request, options, callback)
createCustomMetric(request: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.ICustomMetric, protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createCustomMetric(request, callback)
createCustomMetric(request: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, callback: Callback<protos.google.analytics.admin.v1beta.ICustomMetric, protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createDataStream(request, options)
createDataStream(request?: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IDataStream,
protos.google.analytics.admin.v1beta.ICreateDataStreamRequest | undefined,
{} | undefined
]>;
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'
/**
* Required. The DataStream to create.
*/
// const dataStream = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateDataStream() {
// Construct request
const request = {
parent,
dataStream,
};
// Run request
const response = await adminClient.createDataStream(request);
console.log(response);
}
callCreateDataStream();
createDataStream(request, options, callback)
createDataStream(request: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IDataStream, protos.google.analytics.admin.v1beta.ICreateDataStreamRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createDataStream(request, callback)
createDataStream(request: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, callback: Callback<protos.google.analytics.admin.v1beta.IDataStream, protos.google.analytics.admin.v1beta.ICreateDataStreamRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createFirebaseLink(request, options)
createFirebaseLink(request?: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IFirebaseLink,
(protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest | undefined),
{} | undefined
]>;
Creates a FirebaseLink.
Properties can have at most one FirebaseLink.
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'
/**
* Required. The Firebase link to create.
*/
// const firebaseLink = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateFirebaseLink() {
// Construct request
const request = {
parent,
firebaseLink,
};
// Run request
const response = await adminClient.createFirebaseLink(request);
console.log(response);
}
callCreateFirebaseLink();
createFirebaseLink(request, options, callback)
createFirebaseLink(request: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IFirebaseLink, protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createFirebaseLink(request, callback)
createFirebaseLink(request: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, callback: Callback<protos.google.analytics.admin.v1beta.IFirebaseLink, protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createGoogleAdsLink(request, options)
createGoogleAdsLink(request?: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IGoogleAdsLink,
(protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest | undefined),
{} | undefined
]>;
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'
/**
* Required. The GoogleAdsLink to create.
*/
// const googleAdsLink = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateGoogleAdsLink() {
// Construct request
const request = {
parent,
googleAdsLink,
};
// Run request
const response = await adminClient.createGoogleAdsLink(request);
console.log(response);
}
callCreateGoogleAdsLink();
createGoogleAdsLink(request, options, callback)
createGoogleAdsLink(request: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IGoogleAdsLink, protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createGoogleAdsLink(request, callback)
createGoogleAdsLink(request: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, callback: Callback<protos.google.analytics.admin.v1beta.IGoogleAdsLink, protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createKeyEvent(request, options)
createKeyEvent(request?: protos.google.analytics.admin.v1beta.ICreateKeyEventRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IKeyEvent,
protos.google.analytics.admin.v1beta.ICreateKeyEventRequest | undefined,
{} | undefined
]>;
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 Key Event to create.
*/
// const keyEvent = {}
/**
* Required. The resource name of the parent property where this Key Event
* will be created. Format: properties/123
*/
// const parent = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateKeyEvent() {
// Construct request
const request = {
keyEvent,
parent,
};
// Run request
const response = await adminClient.createKeyEvent(request);
console.log(response);
}
callCreateKeyEvent();
createKeyEvent(request, options, callback)
createKeyEvent(request: protos.google.analytics.admin.v1beta.ICreateKeyEventRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IKeyEvent, protos.google.analytics.admin.v1beta.ICreateKeyEventRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createKeyEvent(request, callback)
createKeyEvent(request: protos.google.analytics.admin.v1beta.ICreateKeyEventRequest, callback: Callback<protos.google.analytics.admin.v1beta.IKeyEvent, protos.google.analytics.admin.v1beta.ICreateKeyEventRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createMeasurementProtocolSecret(request, options)
createMeasurementProtocolSecret(request?: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret,
(protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest | undefined),
{} | undefined
]>;
Creates a measurement protocol secret.
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 secret will be created.
* Format: properties/{property}/dataStreams/{dataStream}
*/
// const parent = 'abc123'
/**
* Required. The measurement protocol secret to create.
*/
// const measurementProtocolSecret = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateMeasurementProtocolSecret() {
// Construct request
const request = {
parent,
measurementProtocolSecret,
};
// Run request
const response = await adminClient.createMeasurementProtocolSecret(request);
console.log(response);
}
callCreateMeasurementProtocolSecret();
createMeasurementProtocolSecret(request, options, callback)
createMeasurementProtocolSecret(request: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createMeasurementProtocolSecret(request, callback)
createMeasurementProtocolSecret(request: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, callback: Callback<protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createProperty(request, options)
createProperty(request?: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1beta.IProperty,
protos.google.analytics.admin.v1beta.ICreatePropertyRequest | undefined,
{} | undefined
]>;
Creates an "GA4" property with the specified location and attributes.
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 property to create.
* Note: the supplied property must specify its parent.
*/
// const property = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateProperty() {
// Construct request
const request = {
property,
};
// Run request
const response = await adminClient.createProperty(request);
console.log(response);
}
callCreateProperty();
createProperty(request, options, callback)
createProperty(request: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1beta.IProperty, protos.google.analytics.admin.v1beta.ICreatePropertyRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createProperty(request, callback)
createProperty(request: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, callback: Callback<protos.google.analytics.admin.v1beta.IProperty, protos.google.analytics.admin.v1beta.ICreatePropertyRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
customDimensionPath(property, customDimension)
customDimensionPath(property: string, customDimension: string): string;
Return a fully-qualified customDimension resource name string.
Parameters |
Name |
Description |
property |
string
|
customDimension |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
customMetricPath(property, customMetric)
customMetricPath(property: string, customMetric: string): string;
Return a fully-qualified customMetric resource name string.
Parameters |
Name |
Description |
property |
string
|
customMetric |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
dataRetentionSettingsPath(property)
dataRetentionSettingsPath(property: string): string;
Return a fully-qualified dataRetentionSettings resource name string.
Parameter |
Name |
Description |
property |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
dataSharingSettingsPath(account)
dataSharingSettingsPath(account: string): string;
Return a fully-qualified dataSharingSettings resource name string.
Parameter |
Name |
Description |
account |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
dataStreamPath(property, dataStream)
dataStreamPath(property: string, dataStream: string): string;
Return a fully-qualified dataStream resource name string.
Parameters |
Name |
Description |
property |
string
|
dataStream |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
deleteAccount(request, options)
deleteAccount(request?: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.analytics.admin.v1beta.IDeleteAccountRequest | undefined,
{} | undefined
]>;
Marks target Account as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.
If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found.
Parameters |
Name |
Description |
request |
IDeleteAccountRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
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 Account to soft-delete.
* Format: accounts/{account}
* Example: "accounts/100"
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callDeleteAccount() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.deleteAccount(request);
console.log(response);
}
callDeleteAccount();
deleteAccount(request, options, callback)
deleteAccount(request: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteAccountRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteAccount(request, callback)
deleteAccount(request: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteAccountRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteConversionEvent(request, options)
deleteConversionEvent(request?: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest | undefined),
{} | undefined
]>;
Deprecated: Use DeleteKeyEvent
instead. Deletes a conversion event in a property.
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 conversion event to delete.
* Format: properties/{property}/conversionEvents/{conversion_event}
* Example: "properties/123/conversionEvents/456"
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callDeleteConversionEvent() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.deleteConversionEvent(request);
console.log(response);
}
callDeleteConversionEvent();
deleteConversionEvent(request, options, callback)
deleteConversionEvent(request: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteConversionEvent(request, callback)
deleteConversionEvent(request: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteDataStream(request, options)
deleteDataStream(request?: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest | undefined,
{} | undefined
]>;
Deletes a DataStream on a property.
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 DataStream to delete.
* Example format: properties/1234/dataStreams/5678
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callDeleteDataStream() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.deleteDataStream(request);
console.log(response);
}
callDeleteDataStream();
deleteDataStream(request, options, callback)
deleteDataStream(request: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteDataStream(request, callback)
deleteDataStream(request: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteFirebaseLink(request, options)
deleteFirebaseLink(request?: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest | undefined),
{} | undefined
]>;
Deletes a FirebaseLink on a property
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}/firebaseLinks/{firebase_link_id}
* Example: `properties/1234/firebaseLinks/5678`
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callDeleteFirebaseLink() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.deleteFirebaseLink(request);
console.log(response);
}
callDeleteFirebaseLink();
deleteFirebaseLink(request, options, callback)
deleteFirebaseLink(request: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteFirebaseLink(request, callback)
deleteFirebaseLink(request: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
deleteGoogleAdsLink(request, options)
deleteGoogleAdsLink(request?: protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest | undefined),
{} | undefined
]>;
Deletes a GoogleAdsLink o