AdsApp.​AdGroupExtensions

  • This page details how to access ad group-level extensions, such as sitelinks, callouts, and phone numbers, within Google Ads scripts.

  • It provides code examples and methods to retrieve selectors for various extension types.

  • Each method, like callouts() or sitelinks(), returns a selector object allowing you to iterate through and manage extensions of that type within the ad group.

  • These selectors facilitate efficient access and manipulation of specific extension types associated with ad groups in your campaigns.

Access to ad group-level extensions.

For example, to access all sitelinks belonging to an ad group:

var adGroupSitelinkIterator = adGroup.extensions().sitelinks().get();
while (adGroupSitelinkIterator.hasNext()) {
  var adGroupSitelink = adGroupSitelinkIterator.next();
}

Methods:

MemberTypeDescription
callouts() AdsApp.AdGroupCalloutSelector Returns the selector of all callouts in the ad group.
mobileApps() AdsApp.AdGroupMobileAppSelector Returns the selector of all mobile apps in the ad group.
phoneNumbers() AdsApp.AdGroupPhoneNumberSelector Returns the selector of all phone numbers in the ad group.
prices() AdsApp.AdGroupPriceSelector Returns the selector of all prices in the ad group.
sitelinks() AdsApp.AdGroupSitelinkSelector Returns the selector of all sitelinks in the ad group.
snippets() AdsApp.AdGroupSnippetSelector Returns the selector of all snippets in the ad group.

callouts()

Returns the selector of all callouts in the ad group.

Return values:

TypeDescription
AdsApp.AdGroupCalloutSelector The selector of all callouts in the ad group.

mobileApps()

Returns the selector of all mobile apps in the ad group.

Return values:

TypeDescription
AdsApp.AdGroupMobileAppSelector The selector of all mobile apps in the ad group.

phoneNumbers()

Returns the selector of all phone numbers in the ad group.

Return values:

TypeDescription
AdsApp.AdGroupPhoneNumberSelector The selector of all phone numbers in the ad group.

prices()

Returns the selector of all prices in the ad group.

Return values:

TypeDescription
AdsApp.AdGroupPriceSelector The selector of all prices in the ad group.
Returns the selector of all sitelinks in the ad group.

Return values:

TypeDescription
AdsApp.AdGroupSitelinkSelector The selector of all sitelinks in the ad group.

snippets()

Returns the selector of all snippets in the ad group.

Return values:

TypeDescription
AdsApp.AdGroupSnippetSelector The selector of all snippets in the ad group.