AdsApp.​PlacementBuilder

  • The PlacementBuilder is used to create Placement objects.

  • It has methods to set the URL, CPC, and CPM for a new placement.

  • The build() method creates the placement, while exclude() creates an excluded placement.

  • The withUrl() method is required when building a placement.

Builder for Placement objects.

Example usage:

 var 
  
 placementBuilder 
  
 = 
  
 adGroup 
 . 
 display 
 () 
 . 
 newPlacementBuilder 
 () 
  
 . 
 withUrl 
 ( 
 "http://www.site.com" 
 ) 
  
 // 
  
 required 
  
 . 
 withCpc 
 ( 
 0.50 
 ) 
  
 // 
  
 optional 
  
 . 
 build 
 () 
  
 // 
  
 create 
  
 the 
  
 placement 

Methods:

Member Type Description
AdsApp.PlacementOperation Builds the placement.
AdsApp.ExcludedPlacementOperation Builds the excluded placement.
AdsApp.PlacementBuilder Sets the max CPC bid of the new placement to the specified value.
AdsApp.PlacementBuilder Sets the CPM bid of the new placement to the specified value.
AdsApp.PlacementBuilder Sets the URL of the placement.

build()

Builds the placement. Returns a PlacementOperation that corresponds to the creation of the Placement .

Return values:

Type Description
AdsApp.PlacementOperation The PlacementOperation.

exclude()

Builds the excluded placement. Returns an ExcludedPlacementOperation that corresponds to the creation of the ExcludedPlacement .

Return values:

Type Description
AdsApp.ExcludedPlacementOperation The ExcludedPlacementOperation.

withCpc(cpc)

Sets the max CPC bid of the new placement to the specified value.

Arguments:

Name Type Description
cpc
double The max CPC bid of the placement.

Return values:

Type Description
AdsApp.PlacementBuilder The placement builder with the specified max CPC.

withCpm(cpm)

Sets the CPM bid of the new placement to the specified value.

See Cost-per-thousand impressions (CPM) for more information.

Arguments:

Name Type Description
cpm
double The CPM bid of the placement.

Return values:

Type Description
AdsApp.PlacementBuilder The placement builder with the specified CPM.

withUrl(url)

Sets the URL of the placement. This field is required.

Arguments:

Name Type Description
url
String The placement URL.

Return values:

Type Description
AdsApp.PlacementBuilder A PlacementBuilder with the specified URL.
Create a Mobile Website
View Site in Mobile | Classic
Share by: