AdsApp.CampaignExtensions
Stay organized with collections
Save and categorize content based on your preferences.
Access to campaign-level extensions.
For example, to access all sitelinks belonging to a campaign:
var campaignSitelinkIterator = campaign.extensions().sitelinks().get();
while (campaignSitelinkIterator.hasNext()) {
var campaignSitelink = campaignSitelinkIterator.next();
}
Methods:
callouts()
Returns the selector of all callouts in the campaign.
Return values:
mobileApps()
Returns the selector of all mobile apps in the campaign.
Return values:
phoneNumbers()
Returns the selector of all phone numbers in the campaign.
Return values:
prices()
Returns the selector of all prices in the campaign.
Return values:
sitelinks()
Returns the selector of all sitelinks in the campaign.
Return values:
snippets()
Returns the selector of all snippets in the campaign.
Return values:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThis page focuses on how to access campaign-level extensions within Google Ads scripts.\u003c/p\u003e\n"],["\u003cp\u003eThe provided code snippet demonstrates how to iterate through and access all sitelinks associated with a specific campaign.\u003c/p\u003e\n"],["\u003cp\u003eA table outlines various methods to retrieve selectors for different campaign extension types, including callouts, mobile apps, phone numbers, prices, sitelinks, and snippets.\u003c/p\u003e\n"],["\u003cp\u003eEach method returns a specific selector object, allowing you to further manipulate and access the respective extensions.\u003c/p\u003e\n"],["\u003cp\u003eThis information is crucial for developers aiming to automate campaign extension management or perform analysis at the campaign level.\u003c/p\u003e\n"]]],[],null,["Access to campaign-level extensions.\n\nFor example, to access all sitelinks belonging to a campaign:\n\n```gdscript\nvar campaignSitelinkIterator = campaign.extensions().sitelinks().get();\nwhile (campaignSitelinkIterator.hasNext()) {\n var campaignSitelink = campaignSitelinkIterator.next();\n}\n```\n\nMethods:\n\n| Member | Type | Description |\n|---------------------------------|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|\n| [callouts](#callouts_0) | [AdsApp.CampaignCalloutSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaigncalloutselector) | Returns the selector of all callouts in the campaign. |\n| [mobileApps](#mobileApps_0) | [AdsApp.CampaignMobileAppSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignmobileappselector) | Returns the selector of all mobile apps in the campaign. |\n| [phoneNumbers](#phoneNumbers_0) | [AdsApp.CampaignPhoneNumberSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignphonenumberselector) | Returns the selector of all phone numbers in the campaign. |\n| [prices](#prices_0) | [AdsApp.CampaignPriceSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignpriceselector) | Returns the selector of all prices in the campaign. |\n| [sitelinks](#sitelinks_0) | [AdsApp.CampaignSitelinkSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignsitelinkselector) | Returns the selector of all sitelinks in the campaign. |\n| [snippets](#snippets_0) | [AdsApp.CampaignSnippetSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignsnippetselector) | Returns the selector of all snippets in the campaign. |\n\n`callouts()` Returns the selector of all callouts in the campaign.\n\nReturn values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------------------|-----------------------------------------------|\n| [AdsApp.CampaignCalloutSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaigncalloutselector) | The selector of all callouts in the campaign. |\n\n`mobileApps()` Returns the selector of all mobile apps in the campaign.\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------|--------------------------------------------------|\n| [AdsApp.CampaignMobileAppSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignmobileappselector) | The selector of all mobile apps in the campaign. |\n\n`phoneNumbers()` Returns the selector of all phone numbers in the campaign.\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| [AdsApp.CampaignPhoneNumberSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignphonenumberselector) | The selector of all phone numbers in the campaign. |\n\n`prices()` Returns the selector of all prices in the campaign.\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------|---------------------------------------------|\n| [AdsApp.CampaignPriceSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignpriceselector) | The selector of all prices in the campaign. |\n\n`sitelinks()` Returns the selector of all sitelinks in the campaign.\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------------|------------------------------------------------|\n| [AdsApp.CampaignSitelinkSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignsitelinkselector) | The selector of all sitelinks in the campaign. |\n\n`snippets()` Returns the selector of all snippets in the campaign.\n\nReturn values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------------------|-----------------------------------------------|\n| [AdsApp.CampaignSnippetSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_campaignsnippetselector) | The selector of all snippets in the campaign. |"]]