Page Summary
-
Callout extensions can be created using the
AdsApp.extensions().newCalloutBuilder()method, requiring at least the text to be set. -
Created callout extensions can be added to campaigns, ad groups, or the entire account using the
addCallout()method. -
Callout details and performance statistics can be retrieved for campaigns, ad groups, or accounts by iterating through their callout extensions and using methods like
getText(),isMobilePreferred(), andgetStatsFor(). -
Schedules for callout extensions can be set using the
setSchedules()method, defining specific days and times for the callout to show.
Create a callout extension
function createCallout() { // For full details on creating a new callout extension, see: // https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_calloutbuilder const newCallout = AdsApp.extensions().newCalloutBuilder() // Replace the values below with your text, and mobile preferred .withText('Free Shipping') // required .withMobilePreferred(true) // optional .build() .getResult(); // Add callout to a campaign const campaignIterator = AdsApp.campaigns()