AdsApp.Label
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads label.
Methods:
adGroups()
Returns the selector of all ad groups to which the label is applied.
Return values:
ads()
Returns the selector of all ads to which the label is applied.
Return values:
Type | Description |
AdsApp.AdSelector |
The selector of all ads to which the label is applied. |
campaigns()
Returns the selector of all campaigns to which the label is applied.
Return values:
getColor()
Returns the color code of the label.
Return values:
Type | Description |
String |
Color code of the label. The returned string will always be in
uppercase #RRGGBB , e.g., #FFAAFF but never
#ffaaff or #FAF . form. |
getDescription()
Returns the description of the label.
Return values:
Type | Description |
String |
Description of the label. |
getEntityType()
Returns the type of this entity as a
String
, in this case,
"Label"
.
Return values:
Type | Description |
String |
Type of this entity: "Label" . |
getId()
Returns the ID of the label.
Return values:
Type | Description |
String |
The ID of the label. |
getName()
Returns the name of the label.
Return values:
Type | Description |
String |
Name of the label. |
getResourceName()
Returns the resource name of the label.
Return values:
Type | Description |
String |
The resource name of the label. |
keywords()
Returns the selector of all keywords to which the label is applied.
Return values:
remove()
Removes the label.
Returns nothing.
setColor(color)
Sets the background color of the label.
Returns nothing.
Arguments:
Name | Type | Description |
color |
String |
The new color. It must be specified in either RGB form
(#RRGGBB or #RGB ) or one of the 16 basic CSS color
names. |
setDescription(description)
Sets the description for this label. The description may not be longer than
200 characters.
Returns nothing.
Arguments:
Name | Type | Description |
description |
String |
The description for the label. |
setName(name)
Changes the name of the Label. The name must be unique, non-empty, and may
not be longer than 100 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-01-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[[["Represents a Google Ads label and provides methods to manage it."],["Allows you to get selectors for ad groups, ads, campaigns, and keywords associated with the label."],["Enables retrieval and modification of label properties like color, description, and name."],["Includes methods to remove the label and update its attributes."]]],[]]