AdsManagerApp

The root object of the MCC API. Exposes methods for fetching and selecting ManagedAccount.

Methods:

MemberTypeDescription
accountLabels AdsManagerApp.AccountLabelSelector Returns the selector of all account labels in the account.
accounts AdsManagerApp.ManagedAccountSelector Returns the selector of accounts managed by this MCC account.
createAccountLabel void Creates a new account label.
select void Selects a ManagedAccount as the next account on which to operate.

accountLabels()

Returns the selector of all account labels in the account.

Return values:

TypeDescription
AdsManagerApp.AccountLabelSelector The selector of all account labels in the account.

accounts()

Returns the selector of accounts managed by this MCC account.

MCC Accounts that manage other accounts (i.e. Client Managers) are not returned.

Return values:

TypeDescription
AdsManagerApp.ManagedAccountSelector The selector of accounts under this MCC.

createAccountLabel(name)

Creates a new account label.

Usage examples:

AdsManagerApp.createAccountLabel("My Account Label");

Returns nothing.

Arguments:

NameTypeDescription
name String The name of the new account label. Label names are case sensitive and must be unique. Max length is 40 characters. Any leading or trailing white spaces will be trimmed.

select(account)

Selects a ManagedAccount as the next account on which to operate.

This can be used to make changes to an account managed by this MCC.

 var mccAccount = AdsApp.currentAccount();
 var childAccounts =
   AdsManagerApp.accounts().withIds(['123-456-7890']).get();
 var childAccount = childAccounts.next();

 AdsManagerApp.select(childAccount);
 // Now in the child account.
 // Returns all the keywords in the account whose CustomerId is
 // '123-456-7890'.
 var keywords = AdsApp.keywords().get();

 AdsManagerApp.select(mccAccount);
 // Now back in the mcc account.

Returns nothing.

Arguments:

NameTypeDescription
account AdsManagerApp.ManagedAccount The account in whose context the script will continue executing.