Service Interface for the Analytics Admin API (GA4). v1alpha
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
accountAccessBindingPath(account, accessBinding)
accountAccessBindingPath(account: string, accessBinding: string): string;
Return a fully-qualified accountAccessBinding resource name string.
Parameters |
Name |
Description |
account |
string
|
accessBinding |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
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.v1alpha.IAcknowledgeUserDataCollectionRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse,
(protos.google.analytics.admin.v1alpha.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-analytics/admin').v1alpha;
// 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.v1alpha.IAcknowledgeUserDataCollectionRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
acknowledgeUserDataCollection(request, callback)
acknowledgeUserDataCollection(request: protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
adSenseLinkPath(property, adsenseLink)
adSenseLinkPath(property: string, adsenseLink: string): string;
Return a fully-qualified adSenseLink resource name string.
Parameters |
Name |
Description |
property |
string
|
adsenseLink |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
approveDisplayVideo360AdvertiserLinkProposal(request, options)
approveDisplayVideo360AdvertiserLinkProposal(request?: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse,
(protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest | undefined),
{} | undefined
]>;
Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal will be deleted and a new DisplayVideo360AdvertiserLink will 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 name of the DisplayVideo360AdvertiserLinkProposal to approve.
* Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callApproveDisplayVideo360AdvertiserLinkProposal() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.approveDisplayVideo360AdvertiserLinkProposal(request);
console.log(response);
}
callApproveDisplayVideo360AdvertiserLinkProposal();
approveDisplayVideo360AdvertiserLinkProposal(request, options, callback)
approveDisplayVideo360AdvertiserLinkProposal(request: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
approveDisplayVideo360AdvertiserLinkProposal(request, callback)
approveDisplayVideo360AdvertiserLinkProposal(request: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveAudience(request, options)
archiveAudience(request?: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest | undefined,
{} | undefined
]>;
Archives an Audience 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. Example format: properties/1234/audiences/5678
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callArchiveAudience() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.archiveAudience(request);
console.log(response);
}
callArchiveAudience();
archiveAudience(request, options, callback)
archiveAudience(request: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveAudience(request, callback)
archiveAudience(request: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomDimension(request, options)
archiveCustomDimension(request?: protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1alpha.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-analytics/admin').v1alpha;
// 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.v1alpha.IArchiveCustomDimensionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomDimension(request, callback)
archiveCustomDimension(request: protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomMetric(request, options)
archiveCustomMetric(request?: protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1alpha.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-analytics/admin').v1alpha;
// 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.v1alpha.IArchiveCustomMetricRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
archiveCustomMetric(request, callback)
archiveCustomMetric(request: protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
attributionSettingsPath(property)
attributionSettingsPath(property: string): string;
Return a fully-qualified attributionSettings resource name string.
Parameter |
Name |
Description |
property |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
audiencePath(property, audience)
audiencePath(property: string, audience: string): string;
Return a fully-qualified audience resource name string.
Parameters |
Name |
Description |
property |
string
|
audience |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
batchCreateAccessBindings(request, options)
batchCreateAccessBindings(request?: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse,
(protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest | undefined),
{} | undefined
]>;
Creates information about multiple access bindings to an account or property.
This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will 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 account or property that owns the access bindings. The parent
* field in the CreateAccessBindingRequest messages must either be empty or
* match this field. Formats:
* - accounts/{account}
* - properties/{property}
*/
// const parent = 'abc123'
/**
* Required. The requests specifying the access bindings to create.
* A maximum of 1000 access bindings can be created in a batch.
*/
// const requests = [1,2,3,4]
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callBatchCreateAccessBindings() {
// Construct request
const request = {
parent,
requests,
};
// Run request
const response = await adminClient.batchCreateAccessBindings(request);
console.log(response);
}
callBatchCreateAccessBindings();
batchCreateAccessBindings(request, options, callback)
batchCreateAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchCreateAccessBindings(request, callback)
batchCreateAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchDeleteAccessBindings(request, options)
batchDeleteAccessBindings(request?: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest | undefined),
{} | undefined
]>;
Deletes information about multiple users' links to an account or 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 account or property that owns the access bindings. The parent
* of all provided values for the 'names' field in DeleteAccessBindingRequest
* messages must match this field. Formats:
* - accounts/{account}
* - properties/{property}
*/
// const parent = 'abc123'
/**
* Required. The requests specifying the access bindings to delete.
* A maximum of 1000 access bindings can be deleted in a batch.
*/
// const requests = [1,2,3,4]
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callBatchDeleteAccessBindings() {
// Construct request
const request = {
parent,
requests,
};
// Run request
const response = await adminClient.batchDeleteAccessBindings(request);
console.log(response);
}
callBatchDeleteAccessBindings();
batchDeleteAccessBindings(request, options, callback)
batchDeleteAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchDeleteAccessBindings(request, callback)
batchDeleteAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchGetAccessBindings(request, options)
batchGetAccessBindings(request?: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse,
(protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest | undefined),
{} | undefined
]>;
Gets information about multiple access bindings to an account or 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 account or property that owns the access bindings. The parent
* of all provided values for the 'names' field must match this field.
* Formats:
* - accounts/{account}
* - properties/{property}
*/
// const parent = 'abc123'
/**
* Required. The names of the access bindings to retrieve.
* A maximum of 1000 access bindings can be retrieved in a batch.
* Formats:
* - accounts/{account}/accessBindings/{accessBinding}
* - properties/{property}/accessBindings/{accessBinding}
*/
// const names = ['abc','def']
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callBatchGetAccessBindings() {
// Construct request
const request = {
parent,
names,
};
// Run request
const response = await adminClient.batchGetAccessBindings(request);
console.log(response);
}
callBatchGetAccessBindings();
batchGetAccessBindings(request, options, callback)
batchGetAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchGetAccessBindings(request, callback)
batchGetAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchUpdateAccessBindings(request, options)
batchUpdateAccessBindings(request?: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse,
(protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest | undefined),
{} | undefined
]>;
Updates information about multiple access bindings to an account or 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 account or property that owns the access bindings. The parent
* of all provided AccessBinding in UpdateAccessBindingRequest messages must
* match this field.
* Formats:
* - accounts/{account}
* - properties/{property}
*/
// const parent = 'abc123'
/**
* Required. The requests specifying the access bindings to update.
* A maximum of 1000 access bindings can be updated in a batch.
*/
// const requests = [1,2,3,4]
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callBatchUpdateAccessBindings() {
// Construct request
const request = {
parent,
requests,
};
// Run request
const response = await adminClient.batchUpdateAccessBindings(request);
console.log(response);
}
callBatchUpdateAccessBindings();
batchUpdateAccessBindings(request, options, callback)
batchUpdateAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
batchUpdateAccessBindings(request, callback)
batchUpdateAccessBindings(request: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
bigQueryLinkPath(property, bigqueryLink)
bigQueryLinkPath(property: string, bigqueryLink: string): string;
Return a fully-qualified bigQueryLink resource name string.
Parameters |
Name |
Description |
property |
string
|
bigqueryLink |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
calculatedMetricPath(property, calculatedMetric)
calculatedMetricPath(property: string, calculatedMetric: string): string;
Return a fully-qualified calculatedMetric resource name string.
Parameters |
Name |
Description |
property |
string
|
calculatedMetric |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
cancelDisplayVideo360AdvertiserLinkProposal(request, options)
cancelDisplayVideo360AdvertiserLinkProposal(request?: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal,
(protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest | undefined),
{} | undefined
]>;
Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a proposal initiated from Display & Video 360 - Withdrawing a proposal initiated from Google Analytics After being cancelled, a proposal will eventually be deleted automatically.
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 DisplayVideo360AdvertiserLinkProposal to cancel.
* Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678
*/
// const name = 'abc123'
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCancelDisplayVideo360AdvertiserLinkProposal() {
// Construct request
const request = {
name,
};
// Run request
const response = await adminClient.cancelDisplayVideo360AdvertiserLinkProposal(request);
console.log(response);
}
callCancelDisplayVideo360AdvertiserLinkProposal();
cancelDisplayVideo360AdvertiserLinkProposal(request, options, callback)
cancelDisplayVideo360AdvertiserLinkProposal(request: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
cancelDisplayVideo360AdvertiserLinkProposal(request, callback)
cancelDisplayVideo360AdvertiserLinkProposal(request: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
channelGroupPath(property, channelGroup)
channelGroupPath(property: string, channelGroup: string): string;
Return a fully-qualified channelGroup resource name string.
Parameters |
Name |
Description |
property |
string
|
channelGroup |
string
|
Returns |
Type |
Description |
string |
{string} Resource name string.
|
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.
|
createAccessBinding(request, options)
createAccessBinding(request?: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IAccessBinding,
(protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | undefined),
{} | undefined
]>;
Creates an access binding on an account or 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. Formats:
* - accounts/{account}
* - properties/{property}
*/
// const parent = 'abc123'
/**
* Required. The access binding to create.
*/
// const accessBinding = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateAccessBinding() {
// Construct request
const request = {
parent,
accessBinding,
};
// Run request
const response = await adminClient.createAccessBinding(request);
console.log(response);
}
callCreateAccessBinding();
createAccessBinding(request, options, callback)
createAccessBinding(request: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IAccessBinding, protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createAccessBinding(request, callback)
createAccessBinding(request: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IAccessBinding, protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createAdSenseLink(request, options)
createAdSenseLink(request?: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IAdSenseLink,
(protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest | 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 property for which to create an AdSense Link.
* Format: properties/{propertyId}
* Example: properties/1234
*/
// const parent = 'abc123'
/**
* Required. The AdSense Link to create
*/
// const adsenseLink = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateAdSenseLink() {
// Construct request
const request = {
parent,
adsenseLink,
};
// Run request
const response = await adminClient.createAdSenseLink(request);
console.log(response);
}
callCreateAdSenseLink();
createAdSenseLink(request, options, callback)
createAdSenseLink(request: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IAdSenseLink, protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createAdSenseLink(request, callback)
createAdSenseLink(request: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IAdSenseLink, protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createAudience(request, options)
createAudience(request?: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IAudience,
protos.google.analytics.admin.v1alpha.ICreateAudienceRequest | 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 audience to create.
*/
// const audience = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateAudience() {
// Construct request
const request = {
parent,
audience,
};
// Run request
const response = await adminClient.createAudience(request);
console.log(response);
}
callCreateAudience();
createAudience(request, options, callback)
createAudience(request: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IAudience, protos.google.analytics.admin.v1alpha.ICreateAudienceRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createAudience(request, callback)
createAudience(request: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IAudience, protos.google.analytics.admin.v1alpha.ICreateAudienceRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createBigQueryLink(request, options)
createBigQueryLink(request?: protos.google.analytics.admin.v1alpha.ICreateBigQueryLinkRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.IBigQueryLink,
(protos.google.analytics.admin.v1alpha.ICreateBigQueryLinkRequest | 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 BigQueryLink to create.
*/
// const bigqueryLink = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateBigQueryLink() {
// Construct request
const request = {
parent,
bigqueryLink,
};
// Run request
const response = await adminClient.createBigQueryLink(request);
console.log(response);
}
callCreateBigQueryLink();
createBigQueryLink(request, options, callback)
createBigQueryLink(request: protos.google.analytics.admin.v1alpha.ICreateBigQueryLinkRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.IBigQueryLink, protos.google.analytics.admin.v1alpha.ICreateBigQueryLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createBigQueryLink(request, callback)
createBigQueryLink(request: protos.google.analytics.admin.v1alpha.ICreateBigQueryLinkRequest, callback: Callback<protos.google.analytics.admin.v1alpha.IBigQueryLink, protos.google.analytics.admin.v1alpha.ICreateBigQueryLinkRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createCalculatedMetric(request, options)
createCalculatedMetric(request?: protos.google.analytics.admin.v1alpha.ICreateCalculatedMetricRequest, options?: CallOptions): Promise<[
protos.google.analytics.admin.v1alpha.ICalculatedMetric,
(protos.google.analytics.admin.v1alpha.ICreateCalculatedMetricRequest | undefined),
{} | undefined
]>;
Creates a CalculatedMetric.
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 ID to use for the calculated metric which will become the
* final component of the calculated metric's resource name.
* This value should be 1-80 characters and valid characters are
* /[a-zA-Z0-9_]/, no spaces allowed. calculated_metric_id must be unique
* between all calculated metrics under a property. The calculated_metric_id
* is used when referencing this calculated metric from external APIs, for
* example, "calcMetric:{calculated_metric_id}".
*/
// const calculatedMetricId = 'abc123'
/**
* Required. The CalculatedMetric to create.
*/
// const calculatedMetric = {}
// Imports the Admin library
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha;
// Instantiates a client
const adminClient = new AnalyticsAdminServiceClient();
async function callCreateCalculatedMetric() {
// Construct request
const request = {
parent,
calculatedMetricId,
calculatedMetric,
};
// Run request
const response = await adminClient.createCalculatedMetric(request);
console.log(response);
}
callCreateCalculatedMetric();
createCalculatedMetric(request, options, callback)
createCalculatedMetric(request: protos.google.analytics.admin.v1alpha.ICreateCalculatedMetricRequest, options: CallOptions, callback: Callback<protos.google.analytics.admin.v1alpha.ICalculatedMetric, protos.google.analytics.admin.v1alpha.ICreateCalculatedMetricRequest | null | undefined, {} | null | undefined>): void;
Returns |
Type |
Description |
void |
|
createCalculatedMetric(request, callback)
createCalculatedMetric(request: protos.google.analytics.admin.v1alpha.ICreateCalculatedMetricRequest, callback: Callback<protos.google.analytics.admin.v1alpha.ICalculatedMetric, protos.google.analytics.admin.v1alpha.ICreateCalculatedMetricRequest | null | undefined, {} | null | undefined>): void;