AdsApp.​Label

Represents a Google Ads label.

Methods:

MemberTypeDescription
adGroupsAdsApp.AdGroupSelectorReturns the selector of all ad groups to which the label is applied.
adsAdsApp.AdSelectorReturns the selector of all ads to which the label is applied.
campaignsAdsApp.CampaignSelectorReturns the selector of all campaigns to which the label is applied.
getColorStringReturns the color code of the label.
getDescriptionStringReturns the description of the label.
getEntityTypeStringReturns the type of this entity as a String, in this case, "Label".
getIdStringReturns the ID of the label.
getNameStringReturns the name of the label.
getResourceNameStringReturns the resource name of the label.
keywordsAdsApp.KeywordSelectorReturns the selector of all keywords to which the label is applied.
removevoidRemoves the label.
setColorvoidSets the background color of the label.
setDescriptionvoidSets the description for this label.
setNamevoidChanges the name of the Label.

adGroups()

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

Return values:

TypeDescription
AdsApp.AdGroupSelectorThe 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.AdSelectorThe 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.CampaignSelectorThe selector of all campaigns to which the label is applied.

getColor()

Returns the color code of the label.

Return values:

TypeDescription
StringColor 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
StringDescription of the label.

getEntityType()

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

Return values:

TypeDescription
StringType of this entity: "Label".

getId()

Returns the ID of the label.

Return values:

TypeDescription
StringThe ID of the label.

getName()

Returns the name of the label.

Return values:

TypeDescription
StringName of the label.

getResourceName()

Returns the resource name of the label.

Return values:

TypeDescription
StringThe resource name of the label.

keywords()

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

Return values:

TypeDescription
AdsApp.KeywordSelectorThe 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
colorStringThe 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
descriptionStringThe 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
nameStringThe new name.