type AdUnitTargeting (v202502)
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
      
         
         
         
         Represents targeted or excluded ad units.
         
         
            - Namespace
 
            - 
               
https://www.google.com/apis/ads/publisher/v202502
             
         
         
            
               
                  
                     
                        Field
                      | 
                  
               
               
                  
                     
                        
                           adUnitId
                        
                      | 
                     
                         
                           
                              xsd:string
                         
                        Included or excluded ad unit id.
 
                      | 
                  
                  
                     
                        
                           includeDescendants
                        
                      | 
                     
                         
                           
                              xsd:boolean
                         
                        Whether or not all descendants are included (or excluded) as part of including (or excluding)
                this ad unit. By default, the value is true which means targeting this ad unit will
                target all of its descendants.
 
                      | 
                  
               
            
         
       
   
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  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-06 UTC.
  
  
  
    
      [null,null,["Last updated 2025-08-06 UTC."],[],["The content details `AdUnitTargeting`, which manages the targeting or exclusion of ad units. Key information includes the `adUnitId` (the ID of the targeted ad unit) and `includeDescendants` (a boolean indicating if all descendant ad units are also targeted).  The namespace is specified as `https://www.google.com/apis/ads/publisher/v202502`. It references multiple services like `AdRuleService`, `AdjustmentService` and `ForecastService` which use this `AdUnitTargeting` in the api, specifically in version v202502.\n"]]