AdsManagerApp.AccountLabel
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads account-level label.
Methods:
accounts()
Returns the selector of all accounts to which the account label is applied.
Return values:
getEntityType()
Returns the type of this entity as a
String
, in this case,
"AccountLabel"
.
Return values:
Type | Description |
String |
Type of this entity: "AccountLabel" . |
getId()
Returns the ID of the account label.
Return values:
Type | Description |
String |
ID of the account label. |
getName()
Returns the name of the account label.
Return values:
Type | Description |
String |
Name of the account label. |
getResourceName()
Returns the resource name of the account label.
Return values:
Type | Description |
String |
Resource name of the account label. |
remove()
Removes the account label.
Returns nothing.
setName(name)
Changes the name of the account label. The name must be unique, non-empty,
and may not be longer than
40
characters. Any leading or
trailing white spaces will be trimmed.
Returns nothing.
Arguments:
Name | Type | Description |
name |
String |
The new name. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eRepresents an account-level label within a Google Ads account, allowing for organization and management.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to access and modify the label's properties, including its name, ID, and associated accounts.\u003c/p\u003e\n"],["\u003cp\u003eEnables retrieval of a selector for all accounts to which the label is applied.\u003c/p\u003e\n"],["\u003cp\u003eIncludes functionality to remove the label and change its name, subject to certain constraints.\u003c/p\u003e\n"],["\u003cp\u003eReturns the type of this entity as a string, which is "AccountLabel".\u003c/p\u003e\n"]]],[],null,["# AdsManagerApp.AccountLabel\n\nRepresents a Google Ads account-level label.\n\n### Methods:\n\n| Member | Type | Description |\n|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [accounts()](#accounts) | [AdsManagerApp.ManagedAccountSelector](/google-ads/scripts/docs/reference/adsmanagerapp/adsmanagerapp_managedaccountselector) | Returns the selector of all accounts to which the account label is applied. |\n| [getEntityType()](#getEntityType) | `String` | Returns the type of this entity as a `String`, in this case, `\"AccountLabel\"`. |\n| [getId()](#getId) | `String` | Returns the ID of the account label. |\n| [getName()](#getName) | `String` | Returns the name of the account label. |\n| [getResourceName()](#getResourceName) | `String` | Returns the resource name of the account label. |\n| [remove()](#remove) | `void` | Removes the account label. |\n| [setName(name)](#setName_name) | `void` | Changes the name of the account label. |\n\n`accounts()`\n------------\n\nReturns the selector of all accounts to which the account label is applied.\n\n### Return values:\n\n| Type | Description |\n|-------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|\n| [AdsManagerApp.ManagedAccountSelector](/google-ads/scripts/docs/reference/adsmanagerapp/adsmanagerapp_managedaccountselector) | The selector of all accounts to which the account label is applied. |\n\n`getEntityType()`\n-----------------\n\nReturns the type of this entity as a `String`, in this case, `\"AccountLabel\"`.\n\n### Return values:\n\n| Type | Description |\n|----------|----------------------------------------|\n| `String` | Type of this entity: `\"AccountLabel\"`. |\n\n`getId()`\n---------\n\nReturns the ID of the account label.\n\n### Return values:\n\n| Type | Description |\n|----------|--------------------------|\n| `String` | ID of the account label. |\n\n`getName()`\n-----------\n\nReturns the name of the account label.\n\n### Return values:\n\n| Type | Description |\n|----------|----------------------------|\n| `String` | Name of the account label. |\n\n`getResourceName()`\n-------------------\n\nReturns the resource name of the account label.\n\n### Return values:\n\n| Type | Description |\n|----------|-------------------------------------|\n| `String` | Resource name of the account label. |\n\n`remove()`\n----------\n\nRemoves the account label.\n\nReturns nothing.\n\n`setName(name)`\n---------------\n\nChanges the name of the account label. The name must be unique, non-empty, and may not be longer than `40` characters. Any leading or trailing white spaces will be trimmed.\n\nReturns nothing.\n\n### Arguments:\n\n| Name | Type | Description |\n|------|----------|---------------|\n| name | `String` | The new name. |"]]