ManagedAccount
.
Methods:
Member | Type | Description |
---|---|---|
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:
Type | Description |
---|---|
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:
Type | Description |
---|---|
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:
Name | Type | Description |
---|---|---|
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:
Name | Type | Description |
---|---|---|
account | AdsManagerApp.ManagedAccount |
The account in whose context the script will continue executing. |