AdsApp.​Label

Represents a Google Ads label.

Methods:

MemberTypeDescription
adGroups AdsApp.AdGroupSelector Returns the selector of all ad groups to which the label is applied.
ads AdsApp.AdSelector Returns the selector of all ads to which the label is applied.
campaigns AdsApp.CampaignSelector Returns the selector of all campaigns to which the label is applied.
getColor String Returns the color code of the label.
getDescription String Returns the description of the label.
getEntityType String Returns the type of this entity as a String, in this case, "Label".
getId String Returns the ID of the label.
getName String Returns the name of the label.
getResourceName String Returns the resource name of the label.
keywords AdsApp.KeywordSelector Returns the selector of all keywords to which the label is applied.
remove void Removes the label.
setColor void Sets the background color of the label.
setDescription void Sets the description for this label.
setName void Changes the name of the Label.

adGroups()

Returns the selector of all ad groups to which the label is applied.

Return values:

TypeDescription
AdsApp.AdGroupSelector The selector of all ad groups to which the label is applied.

ads()

Returns the selector of all ads to which the label is applied.

Return values:

TypeDescription
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:

TypeDescription
AdsApp.CampaignSelector The selector of all campaigns to which the label is applied.

getColor()

Returns the color code of the label.

Return values:

TypeDescription
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:

TypeDescription
String Description of the label.

getEntityType()

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

Return values:

TypeDescription
String Type of this entity: "Label".

getId()

Returns the ID of the label.

Return values:

TypeDescription
String The ID of the label.

getName()

Returns the name of the label.

Return values:

TypeDescription
String Name of the label.

getResourceName()

Returns the resource name of the label.

Return values:

TypeDescription
String The resource name of the label.

keywords()

Returns the selector of all keywords to which the label is applied.

Return values:

TypeDescription
AdsApp.KeywordSelector The selector of all keywords to which the label is applied.

remove()

Removes the label.

Returns nothing.

setColor(color)

Sets the background color of the label.

Returns nothing.

Arguments:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
name String The new name.