AdsManagerApp

  • AdsManagerApp is the root object of the MCC API and provides methods for managing accounts and account labels.

  • You can retrieve selectors for all account labels and accounts managed by this MCC account.

  • New account labels can be created using the createAccountLabel method.

  • The select method allows you to switch the script's execution context to a specific managed account.

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

Methods:

Member Type Description
AdsManagerApp.AccountLabelSelector Returns the selector of all account labels in the account.
AdsManagerApp.ManagedAccountSelector Returns the selector of accounts managed by this MCC account.
void Creates a new account label.
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.
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.
Create a Mobile Website
View Site in Mobile | Classic
Share by: