MccApp.​ManagedAccount

Miscellaneous information about MCC Managed Accounts.

Methods:

MemberTypeDescription
applyLabel void Applies an account label to the managed account.
getCurrencyCode String Returns the currency code of the account.
getCustomerId String Returns the customer ID of the account.
getEntityType String Returns the type of this entity as a String, in this case, "Account".
getName String Returns the name of the account.
getStatsFor MccApp.ManagedAccountStats Returns stats for the specified date range.
getStatsFor MccApp.ManagedAccountStats Returns stats for the specified custom date range.
getTimeZone String Returns the POSIX time zone of the account.
labels MccApp.AccountLabelSelector Creates a selector of all account labels that exist in the MCC account.
removeLabel void Removes an account label from the managed account.

applyLabel(name)

Applies an account label to the managed account. The label name is case-sensitive. The operation will fail if the account label with the specified name does not already exist in the MCC account.

Note that an account-level label cannot be applied to more than 1,000 accounts.

Returns nothing.

Arguments:

NameTypeDescription
name String Name of the account label to apply.

getCurrencyCode()

Returns the currency code of the account. The returned values are in the three-letter ISO 4217 format, e.g. 'USD', 'CAD', 'JPY', etc.

Please refer to AdWords API Currency Codes for the full list of possible return values.

Return values:

TypeDescription
String The currency code of the account.

getCustomerId()

Returns the customer ID of the account.

The returned value is in the standard AdWords format, e.g. '123-456-7890'.

Return values:

TypeDescription
String The customer ID of the account.

getEntityType()

Returns the type of this entity as a String, in this case, "Account".

Return values:

TypeDescription
String Type of this entity: "Account".

getName()

Returns the name of the account.

Return values:

TypeDescription
String The account descriptive name, or null if one doesn't exist.

getStatsFor(dateRange)

Returns stats for the specified date range. Supported values:

TODAY, YESTERDAY, LAST_7_DAYS, THIS_WEEK_SUN_TODAY, LAST_WEEK, LAST_14_DAYS, LAST_30_DAYS, LAST_BUSINESS_WEEK, LAST_WEEK_SUN_SAT, THIS_MONTH, LAST_MONTH, ALL_TIME.

Example:
 var stats = account.getStatsFor("THIS_MONTH");

Arguments:

NameTypeDescription
dateRange String Date range for which the stats are requested.

Return values:

TypeDescription
MccApp.ManagedAccountStats The stats for the specified date range.

getStatsFor(dateFrom, dateTo)

Returns stats for the specified custom date range. Both parameters can be either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD form. For instance, March 24th, 2013 is represented as either {year: 2013, month: 3, day: 24} or "20130324". The date range is inclusive on both ends, so forDateRange("20130324", "20130324") defines a range of a single day.

Arguments:

NameTypeDescription
dateFrom Object Start date of the date range. Must be either a string in YYYYMMDD form, or an object with year, month and day properties.
dateTo Object End date of the date range. Must be either a string in YYYYMMDD form, or an object with year, month and day properties.

Return values:

TypeDescription
MccApp.ManagedAccountStats The stats for the specified date range.

getTimeZone()

Returns the POSIX time zone of the account.

Returned values are in the standard time zone identifier form, such as 'America/Los_Angeles'.

Please refer to AdWords API Timezones for the full list of possible return values.

Return values:

TypeDescription
String The time zone of the account.

labels()

Creates a selector of all account labels that exist in the MCC account.

Return values:

TypeDescription
MccApp.AccountLabelSelector Selector of all account labels that exist in the MCC account.

removeLabel(name)

Removes an account label from the managed account. The label name is case-sensitive. The operation will fail if the account label with the specified name does not already exist in the MCC account.

Returns nothing.

Arguments:

NameTypeDescription
name String Name of the account label to remove.

フィードバックを送信...

ご不明な点がありましたら、Google のサポートページをご覧ください。