AdWordsApp.​AdGroup

Represents an AdWords ad group.

Methods:

MemberTypeDescription
adParams AdWordsApp.AdParamSelector Creates a selector of all ad params in the ad group.
addCallout AdWordsApp.CalloutOperation Adds a callout to this ad group.
addMessage AdWordsApp.MessageOperation Adds a message to this ad group.
addMobileApp AdWordsApp.MobileAppOperation Adds a mobile app to this ad group.
addPhoneNumber AdWordsApp.PhoneNumberOperation Adds a phone number to this ad group.
addReview AdWordsApp.ReviewOperation Adds a review to this ad group.
addSitelink AdWordsApp.SitelinkOperation Adds a sitelink to this ad group.
addSnippet AdWordsApp.SnippetOperation Adds a snippet to this ad group.
ads AdWordsApp.AdSelector Returns the selector of all ads in the ad group.
applyLabel void Applies a label to the ad group.
bidding AdWordsApp.AdGroupBidding Provides access to this ad group's bidding fields.
clearMobileBidModifier void Clears the mobile bid modifier for this ad group.
createNegativeKeyword void Creates a new negative keyword with the specified text.
devices AdWordsApp.AdGroupDevices Returns an AdGroupDevices instance associated with the ad group.
display AdWordsApp.AdGroupDisplay Provides access to this ad group's display criteria: Audience, ExcludedAudience, DisplayKeyword, ExcludedDisplayKeyword, Placement, ExcludedPlacement, Topic, and ExcludedTopic.
enable void Enables the ad group.
extensions AdWordsApp.AdGroupExtensions Provides access to this ad group's extensions: AdGroupCallout, AdGroupMessage, AdGroupMobileApp, AdGroupPhoneNumber, AdGroupReview, AdGroupSitelink, and AdGroupSnippet.
getCampaign AdWordsApp.Campaign Returns the campaign to which this ad group belongs.
getEntityType String Returns the type of this entity as a String, in this case, "AdGroup".
getId long Returns the ID of the ad group.
getMobileBidModifier double Returns the mobile bid modifier for this ad group.
getName String Returns the name of the ad group.
getStatsFor AdWordsApp.Stats Returns stats for the specified date range.
getStatsFor AdWordsApp.Stats Returns stats for the specified custom date range.
isEnabled boolean Returns true if the ad group is enabled.
isPaused boolean Returns true if the ad group is paused.
isRemoved boolean Returns true if the ad group is removed.
keywords AdWordsApp.KeywordSelector Returns the selector of all keywords in the ad group.
labels AdWordsApp.LabelSelector Creates a selector of all labels applied to the ad group.
negativeKeywords AdWordsApp.NegativeKeywordSelector Returns a selector of all negative keywords in the ad group.
newAd AdWordsApp.AdBuilderSpace Returns a new ad builder space associated with this ad group.
newKeywordBuilder AdWordsApp.KeywordBuilder Returns a new keyword builder associated with this ad group.
newTextAdBuilder AdWordsApp.AdBuilder Returns a new ad builder associated with this ad group.
pause void Pauses the ad group.
removeCallout void Removes a callout extension from this ad group.
removeLabel void Removes a label from the ad group.
removeMessage void Removes a message extension from this ad group.
removeMobileApp void Removes a mobile app extension from this ad group.
removePhoneNumber void Removes a phone number extension from this ad group.
removeReview void Removes a review extension from this ad group.
removeSitelink void Removes a sitelink extension from this ad group.
removeSnippet void Removes a snippet extension from this ad group.
setMobileBidModifier void Sets the mobile bid modifier for this ad group to the specified value.
setName void Sets the name of the ad group.
targeting AdWordsApp.AdGroupTargeting Provides access to ad group-level targeting criteria: audiences.
urls AdWordsApp.AdGroupUrls Provides access to this ad group's URL fields.

adParams()

Creates a selector of all ad params in the ad group.

Return values:

TypeDescription
AdWordsApp.AdParamSelector Selector of all ad params in the ad group.

addCallout(calloutExtension)

Adds a callout to this ad group. See also Extensions.newCalloutBuilder()

Arguments:

NameTypeDescription
calloutExtension AdWordsApp.Callout The callout to add to this ad group.

Return values:

TypeDescription
AdWordsApp.CalloutOperation The associated callout operation.

addMessage(messageExtension)

Adds a message to this ad group. See also Extensions.newMessageBuilder()

Arguments:

NameTypeDescription
messageExtension AdWordsApp.Message The message to add to this ad group.

Return values:

TypeDescription
AdWordsApp.MessageOperation The associated message operation.

addMobileApp(mobileAppExtension)

Adds a mobile app to this ad group. See also Extensions.newMobileAppBuilder()

Arguments:

NameTypeDescription
mobileAppExtension AdWordsApp.MobileApp The mobile app to add to this ad group.

Return values:

TypeDescription
AdWordsApp.MobileAppOperation The associated mobile app operation.

addPhoneNumber(phoneNumberExtension)

Adds a phone number to this ad group. See also Extensions.newPhoneNumberBuilder()

Arguments:

NameTypeDescription
phoneNumberExtension AdWordsApp.PhoneNumber The phone number to add to this ad group.

Return values:

TypeDescription
AdWordsApp.PhoneNumberOperation The associated phone number operation.

addReview(reviewExtension)

Adds a review to this ad group. See also Extensions.newReviewBuilder()

Arguments:

NameTypeDescription
reviewExtension AdWordsApp.Review The review to add to this ad group.

Return values:

TypeDescription
AdWordsApp.ReviewOperation The associated review operation.
Adds a sitelink to this ad group. See also Extensions.newSitelinkBuilder()

Arguments:

NameTypeDescription
sitelinkExtension AdWordsApp.Sitelink The sitelink to add to this ad group.

Return values:

TypeDescription
AdWordsApp.SitelinkOperation The associated sitelink operation.

addSnippet(snippetExtension)

Adds a snippet to this ad group. See also Extensions.newSnippetBuilder()

Arguments:

NameTypeDescription
snippetExtension AdWordsApp.Snippet The snippet to add to this ad group.

Return values:

TypeDescription
AdWordsApp.SnippetOperation The associated snippet operation.

ads()

Returns the selector of all ads in the ad group.

Return values:

TypeDescription
AdWordsApp.AdSelector The selector of all ads in the ad group.

applyLabel(name)

Applies a label to the ad group. name of the label is case-sensitive. Operation will fail if the label with the specified name does not already exist in the account.

Note that the ad group cannot not have more than 50 labels.

Returns nothing.

Arguments:

NameTypeDescription
name String Name of the label to apply.

bidding()

Provides access to this ad group's bidding fields.

Return values:

TypeDescription
AdWordsApp.AdGroupBidding Access to this ad group's bidding fields.

clearMobileBidModifier()

Clears the mobile bid modifier for this ad group. By clearing this value, the ad group will use its campaign's mobile bid modifier (if one is set).

For more information about bid modifiers, please see the AdWords Help Center article.

Returns nothing.

createNegativeKeyword(keywordText)

Creates a new negative keyword with the specified text. Match type for the new negative keyword is specified as follows:
  • createNegativeKeyword("shoes") - broad match.
  • createNegativeKeyword("\"shoes\"") - phrase match.
  • createNegativeKeyword("[leather shoes]") - exact match.

Returns nothing.

Arguments:

NameTypeDescription
keywordText String The text of the new negative keyword.

devices()

Returns an AdGroupDevices instance associated with the ad group.

Return values:

TypeDescription
AdWordsApp.AdGroupDevices An AdGroupDevices instance associated with the ad group.

display()

Provides access to this ad group's display criteria: Audience, ExcludedAudience, DisplayKeyword, ExcludedDisplayKeyword, Placement, ExcludedPlacement, Topic, and ExcludedTopic.

Return values:

TypeDescription
AdWordsApp.AdGroupDisplay Access to this ad group's display criteria.

enable()

Enables the ad group.

Returns nothing.

extensions()

Provides access to this ad group's extensions: AdGroupCallout, AdGroupMessage, AdGroupMobileApp, AdGroupPhoneNumber, AdGroupReview, AdGroupSitelink, and AdGroupSnippet.

Return values:

TypeDescription
AdWordsApp.AdGroupExtensions Access to this ad group's extensions.

getCampaign()

Returns the campaign to which this ad group belongs.

Return values:

TypeDescription
AdWordsApp.Campaign The campaign to which this ad group belongs.

getEntityType()

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

Return values:

TypeDescription
String Type of this entity: "AdGroup".

getId()

Returns the ID of the ad group.

Return values:

TypeDescription
long The ID of the ad group.

getMobileBidModifier()

Returns the mobile bid modifier for this ad group.

The bid modifier is a multiplier applied to the ad group's bids on mobile devices. So, for instance, a bid modifier of 1.1 increases the bid to 110% of its original value, and changes a bid of $5.00 to $5.50.

Note that when you set a mobile bid modifier at both campaign- and ad group-level in a single campaign, the ad group mobile bid modifier will be used when determining your bid UNLESS the campaign mobile bid modifier is set to -1 (i.e. -100%) which will opt the entire campaign out of mobile regardless of any ad group mobile bid modifiers that may have been set.

For more information about bid modifiers, please see the AdWords Help Center article.

Return values:

TypeDescription
double The mobile bid modifier.

getName()

Returns the name of the ad group.

Return values:

TypeDescription
String Name of the ad group.

getStatsFor(dateRange)

Returns stats for the specified date range. Supported values:

TODAY, YESTERDAY, LAST_7_DAYS, THIS_WEEK_SUN_TODAY, LAST_WEEK, LAST_14_DAYS, LAST_30_DAYS, LAST_BUSINESS_WEEK, LAST_WEEK_SUN_SAT, THIS_MONTH, LAST_MONTH, ALL_TIME.

Example:
 var stats = adGroup.getStatsFor("THIS_MONTH");

Arguments:

NameTypeDescription
dateRange String Date range for which the stats are requested.

Return values:

TypeDescription
AdWordsApp.Stats The stats for the specified date range.

getStatsFor(dateFrom, dateTo)

Returns stats for the specified custom date range. Both parameters can be either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD form. For instance, March 24th, 2013 is represented as either {year: 2013, month: 3, day: 24} or "20130324". The date range is inclusive on both ends, so forDateRange("20130324", "20130324") defines a range of a single day.

Arguments:

NameTypeDescription
dateFrom Object Start date of the date range. Must be either a string in YYYYMMDD form, or an object with year, month and day properties.
dateTo Object End date of the date range. Must be either a string in YYYYMMDD form, or an object with year, month and day properties.

Return values:

TypeDescription
AdWordsApp.Stats The stats for the specified date range.

isEnabled()

Returns true if the ad group is enabled.

Return values:

TypeDescription
boolean true if the ad group is enabled.

isPaused()

Returns true if the ad group is paused.

Return values:

TypeDescription
boolean true if the ad group is paused.

isRemoved()

Returns true if the ad group is removed.

Return values:

TypeDescription
boolean true if the ad group is removed.

keywords()

Returns the selector of all keywords in the ad group.

Return values:

TypeDescription
AdWordsApp.KeywordSelector The selector of all keywords in the ad group.

labels()

Creates a selector of all labels applied to the ad group.

Return values:

TypeDescription
AdWordsApp.LabelSelector Selector of all labels applied to the ad group.

negativeKeywords()

Returns a selector of all negative keywords in the ad group.

Return values:

TypeDescription
AdWordsApp.NegativeKeywordSelector The selector of all negative keywords in the ad group.

newAd()

Returns a new ad builder space associated with this ad group.

Return values:

TypeDescription
AdWordsApp.AdBuilderSpace A new ad builder space associated with this ad group.

newKeywordBuilder()

Returns a new keyword builder associated with this ad group.

Return values:

TypeDescription
AdWordsApp.KeywordBuilder A new keyword builder associated with this ad group.

newTextAdBuilder()

Returns a new ad builder associated with this ad group.

Return values:

TypeDescription
AdWordsApp.AdBuilder A new ad builder associated with this ad group.

pause()

Pauses the ad group.

Returns nothing.

removeCallout(calloutExtension)

Removes a callout extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
calloutExtension AdWordsApp.Callout The callout to remove from this ad group.

removeLabel(name)

Removes a label from the ad group. name of the label is case-sensitive. Operation will fail if the label with the specified name does not already exist in the account.

Returns nothing.

Arguments:

NameTypeDescription
name String Name of the label.

removeMessage(messageExtension)

Removes a message extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
messageExtension AdWordsApp.Message The message to remove from this ad group.

removeMobileApp(mobileAppExtension)

Removes a mobile app extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
mobileAppExtension AdWordsApp.MobileApp The mobile app to remove from this ad group.

removePhoneNumber(phoneNumberExtension)

Removes a phone number extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
phoneNumberExtension AdWordsApp.PhoneNumber The phone number to remove from this ad group.

removeReview(reviewExtension)

Removes a review extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
reviewExtension AdWordsApp.Review The review to remove from this ad group.
Removes a sitelink extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
sitelinkExtension AdWordsApp.Sitelink The sitelink to remove from this ad group.

removeSnippet(snippetExtension)

Removes a snippet extension from this ad group.

Returns nothing.

Arguments:

NameTypeDescription
snippetExtension AdWordsApp.Snippet The snippet to remove from this ad group.

setMobileBidModifier(modifier)

Sets the mobile bid modifier for this ad group to the specified value.

The bid modifier is a multiplier applied to the ad group's bids on mobile devices. So, for instance, a bid modifier of 1.1 increases the bid to 110% of its original value, and changes a bid of $5.00 to $5.50.

The operation will fail if the ad group's campaign has a mobile bid modifier of -1 (i.e. -100%). Setting a campaign mobile bid modifier to -1 will opt the entire campaign out of mobile.

Note that when you set a mobile bid modifier at both campaign- and ad group-level in a single campaign, the ad group mobile bid modifier will be used when determining your bid UNLESS the campaign mobile bid modifier is set to -1 (i.e. -100%) which will opt the entire campaign out of mobile regardless of any ad group mobile bid modifiers that may be set.

For more information about bid modifiers, please see the AdWords Help Center article.

Returns nothing.

Arguments:

NameTypeDescription
modifier double The new mobile bid modifier.

setName(name)

Sets the name of the ad group.

Returns nothing.

Arguments:

NameTypeDescription
name String The new name for the ad group.

targeting()

Provides access to ad group-level targeting criteria: audiences. SearchAdGroupAudience, SearchAdGroupExcludedAudience,

Return values:

TypeDescription
AdWordsApp.AdGroupTargeting Access to certain kinds of targeting criteria in this ad group.

urls()

Provides access to this ad group's URL fields. See Using Upgraded URLs for more information.

Return values:

TypeDescription
AdWordsApp.AdGroupUrls Access to this ad group's URL fields.

Feedback geben zu...

AdWords Scripts
AdWords Scripts