ExpandedTextAd

Contains the methods used to manage an expanded text ad.

This object derives from the Ad object. The list of methods includes all applicable inherited methods.

Note

  • Upgrade your expanded text ads to responsive search ads by February 1, 2023. After this date, you will no longer be able to create new or edit existing expanded text ads. For more information, see About responsive search ads.
  • Existing expanded text ads will continue to serve, and you'll be able to view reports on their performance.
  • You'll still be able to pause, enable, or remove your expanded text ads. Otherwise, attempts to add or update expanded text ads will result in a CampaignServiceAdTypeInvalid error.
  • Learn more about this change.

Methods

Method Name Return Type Description Inherited
applyLabel(string name) void Applies the label to this ad. No
asType AdViewSpace Contains the methods used to cast this ad to a specific ad type. Yes
enable void Enables this ad. Yes
getAdGroup AdGroup Gets the ad group that this ad belongs to. Yes
getCampaign Campaign Gets the campaign that this ad belongs to. Yes
getDescription string Gets this ad's first description. This method is deprecated in favor of getDescription1. Yes
getDescription1 string Gets this ad's first description. This method returns the same value as getDescription. No
getDescription2 string Gets this ad's second description. No
getEntityType string Gets this entity's type. Yes
getHeadlinePart1 string Gets the first part of this ad's title. No
getHeadlinePart2 string Gets the second part of this ad's title. No
getHeadlinePart3 string Gets the third part of this ad's title. No
getId string Gets the ID that uniquely identifies this ad. Yes
getPath1 string Gets the optional first path that's appended to this ad's display URL. No
getPath2 string Gets the optional second path that's appended to this ad's display URL. No
getPolicyApprovalStatus string Gets this ad's editorial approval status. Yes
getStats Stats Gets this ad's performance data. Yes
getType string Gets this ad's derived type. Yes
isEnabled boolean Gets a Boolean value that indicates whether this ad is enabled. Yes
isPaused Boolean Gets a Boolean value that indicates whether this ad is paused. Yes
isType AdTypeSpace Contains the methods used to test if an ad is of the specified type. Yes
labels LabelSelector Gets a selector used to filter the list of labels associated with this ad. No
pause void Pauses this ad. Yes
remove void Removes this ad. Yes
removeLabel(string name) void Removes the label from this ad. No
urls AdUrls Contains the methods used to get this ad's final URLs, tracking template, and custom parameters. Yes

applyLabel(string name)

Applies the label to the ad.

You may apply a maximum of 50 labels to an ad. For an example that adds a label to an entity, see Using labels.

Arguments

Name Type Description
name string The label's case-sensitive name. To get a list of labels in this account that you can apply, see AdsApp.labels.

Returns

Type Description
void Returns nothing.

asType

Contains the methods used to cast this ad to a specific ad type.

Returns

Type Description
AdViewSpace Contains the methods used to cast this ad to a specific ad type.

enable

Enables this ad. (Inherited)

Returns

Type Description
void Returns nothing.

getAdGroup

Gets the ad group that this ad belongs to.

Returns

Type Description
AdGroup The ad group that this ad belongs to.

getCampaign

Gets the campaign that this ad belongs to.

Returns

Type Description
Campaign The campaign that this ad belongs to.

getDescription

Gets this ad's first description. This method is deprecated in favor of getDescription1.

Returns

Type Description
string The ad's first description.

getDescription1

Gets this ad's first description. This method returns the same value as getDescription.

Returns

Type Description
string The ad's first description.

getDescription2

Gets this ad's second description.

Returns

Type Description
string The ad's second description.

getEntityType

Gets this entity's type.

Returns

Type Description
string This entity's type, which is Ad.

getHeadlinePart1

Gets the first part of this ad's title.

Returns

Type Description
string The first part of this ad's title.

getHeadlinePart2

Gets the second part of this ad's title.

Returns

Type Description
string The second part of this ad's title.

getHeadlinePart3

Gets the third part of this ad's title.

Returns

Type Description
string The third part of this ad's title.

getId

Gets the ID that uniquely identifies this ad.

Returns

Type Description
string The ID that uniquely identifies this ad.

getPath1

Gets the optional first path that's appended to this ad's display URL.

Returns

Type Description
string The first path that's appended to this ad's display URL.

getPath2

Gets the optional second path that's appended to this ad's display URL.

Returns

Type Description
string The second path that's appended to this ad's display URL.

getPolicyApprovalStatus

Gets this ad's editorial approval status.

Returns

Type Description
string The ad's editorial approval status. The following are the possible values.
  • APPROVED
  • APPROVED_LIMITED
  • UNDER_REVIEW
  • DISAPPROVED

getStats

Gets this ad's performance data.

To call this method, you must include one of the forDateRange methods in the ad selector's chain.

Returns

Type Description
Stats The ad's performance data.

getType

Gets this ad's derived type.

Returns

Type Description
string This ad's derived type. The following are the possible types.
  • EXPANDED_TEXT_AD
.

isEnabled

Gets a Boolean value that indicates whether this ad is enabled.

Returns

Type Description
boolean Is true if this ad is enabled; otherwise, false.

isPaused

Gets a Boolean value that indicates whether this ad is paused.

Returns

Type Description
Boolean Is true if this ad is paused; otherwise, false.

isType

Contains the methods used to test if an ad is of the specified type.

Returns

Type Description
AdTypeSpace Contains the methods used to test if an ad is of the specified type.

labels

Gets a selector used to filter the list of labels associated with this ad.

Returns

Type Description
LabelSelector A selector used to filter the list of labels associated with this ad.

pause

Pauses this ad.

Returns

Type Description
void Returns nothing.

remove

Removes this ad.

Returns

Type Description
void Returns nothing.

removeLabel(string name)

Removes the label from the ad.

Arguments

Name Type Description
name string The label's case-sensitive name. To get a list of labels associated with this ad, see labels.

Returns

Type Description
void Returns nothing.

urls

Contains the methods used to get this ad's final URLs, tracking template, and custom parameters.

Returns

Type Description
AdUrls The object used to get this ad's final URLs, tracking template, and custom parameters.

See also