AdsApp.PlacementBuilder
    
    
      
      
      Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
   
     
  
  
  
   
  
    
    
  
    
      
  
  
    
      
        outlined_flag 
       
     
    
      
        
          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: 
  
  build()
  Builds the placement. Returns a 
PlacementOperation  that
corresponds to the creation of the 
Placement .  
Return values: 
  
  exclude()
  Builds the excluded placement. Returns an 
ExcludedPlacementOperation 
that corresponds to the creation of the 
ExcludedPlacement .  
Return values: 
  
  withCpc(cpc)
  Sets the max CPC bid of the new placement to the specified value.  
Arguments: 
  
    Name Type Description 
      cpc 
      doubleThe max CPC bid of the placement. 
     
  
  Return values: 
  
  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 
      doubleThe CPM bid of the placement. 
     
  
  Return values: 
  
  withUrl(url)
  Sets the URL of the placement. This field is required.  
Arguments: 
  
    Name Type Description 
      url 
      StringThe placement URL. 
     
  
  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-10-16 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-10-16 UTC."],[],[]]