Contains the methods for defining and creating a responsive search ad. For information about builders, see Builders.
Example usage:
var operation = adGroup.newAd().responsiveSearchAdBuilder()
.withFinalUrl('LANDING PAGE URL GOES HERE')
.build();
// See the Builders topic for performance considerations
// when using the operation object's methods.
if (!operation.isSuccessful()) {
for (var error of operation.getErrors()) {
Logger.log(`${error}\n`);
}
}
Adds the provided description to the current list of descriptions. At least 2 descriptions must be specified using either this or the addDescription() method.
Adds the provided description to the current list of descriptions. At least 2 descriptions must be specified using either this or the addDescription() method.
Arguments
Name
Type
Description
description
string
The ad description to add. For information about limits and including dynamic text strings, see Bing Ads API.
pinning
string
The optional pinned location.
Possible values for descriptions are: DESCRIPTION_1, DESCRIPTION_2
An operation object used to check whether Scripts successfully added the ad.
withCustomParameters(Object customParameters)
Sets the ad's custom parameters.
Custom parameters are helpful with sharing dynamic information across multiple URLs. For more information about its usage, see Custom Parameters.
Arguments
Name
Type
Description
customParameters
Object
A map of up to custom parameters to apply to the ad's final URL. For example, {key1: 'value1', key2: 'value2', key3: 'value3'}, where key is the custom parameter's name and value is the parameter's value. The name may contain a maximum of 16 8-byte characters and the value may contain a maximum of 200 8-byte characters.
The final URL identifies the webpage that the user is taken to when they click the ad. To specify a final URL for mobile devices, first specify a final URL for non-mobile devices (see withFinalUrl()).
Sets the first optional path to append to the ad's display URL.
Arguments
Name
Type
Description
mobileFinalUrl
string
The first optional path to append to the ad's display URL. Microsoft uses the domain specified in withFinalUrl as the display URL. If the final URL's domain is contoso.com and the path is shoes, the ad's display URL is contoso.com/shoes. For usage and limits, see Path1.
Sets the second optional path to append to the ad's display URL.
Arguments
Name
Type
Description
mobileFinalUrl
string
The second optional path to append to the ad's display URL. To specify the second path, first specify the first path (see withPath1). Microsoft uses the domain specified in withFinalUrl as the display URL. If the final URL's domain is contoso.com, the first path is shoes, and the second path is ladies, the ad's display URL is contoso.com/shoes/ladies. For usage and limits, see Path2.
Tracking templates are used with the keyword's FinalUrl to create the destination URL used by the ad. For more information, see What tracking or URL parameters can I use?