type AdUnitTargeting (v202411)
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/v202411
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."],[[["\u003cp\u003eAdUnitTargeting allows publishers to include or exclude specific ad units for targeting.\u003c/p\u003e\n"],["\u003cp\u003eThis targeting can be further refined by including or excluding all descendant ad units of a selected ad unit.\u003c/p\u003e\n"],["\u003cp\u003eAdUnitTargeting utilizes ad unit IDs (\u003ccode\u003eadUnitId\u003c/code\u003e) and a boolean value (\u003ccode\u003eincludeDescendants\u003c/code\u003e) to manage targeting scope.\u003c/p\u003e\n"]]],["The core content describes the `AdUnitTargeting` service within the namespace `https://www.google.com/apis/ads/publisher/v202411`. It defines targeting or excluding ad units using `adUnitId`, a string identifier. The `includeDescendants` boolean field determines if targeting a specific ad unit includes all its child units. The service has dependencies with the InventoryTargeting service and is related to multiple services, including AdRule, Adjustment, AudienceSegment, and others.\n"],null,["# type AdUnitTargeting (v202411)\n\n**Service** \n**AdRuleService** [AdjustmentService](/ad-manager/api/reference/v202411/AdjustmentService.AdUnitTargeting) [AudienceSegmentService](/ad-manager/api/reference/v202411/AudienceSegmentService.AdUnitTargeting) [ForecastService](/ad-manager/api/reference/v202411/ForecastService.AdUnitTargeting) [LineItemService](/ad-manager/api/reference/v202411/LineItemService.AdUnitTargeting) [NativeStyleService](/ad-manager/api/reference/v202411/NativeStyleService.AdUnitTargeting) [ProposalLineItemService](/ad-manager/api/reference/v202411/ProposalLineItemService.AdUnitTargeting) [ProposalService](/ad-manager/api/reference/v202411/ProposalService.AdUnitTargeting) [PublisherQueryLanguageService](/ad-manager/api/reference/v202411/PublisherQueryLanguageService.AdUnitTargeting) [TargetingPresetService](/ad-manager/api/reference/v202411/TargetingPresetService.AdUnitTargeting) [YieldGroupService](/ad-manager/api/reference/v202411/YieldGroupService.AdUnitTargeting) **Dependencies** \n[InventoryTargeting](/ad-manager/api/reference/v202411/AdRuleService.InventoryTargeting) \n▼\n**AdUnitTargeting**\n\nRepresents targeted or excluded ad units.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202411`\n\n| Field ----- ||\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `adUnitId` | ` `xsd:`string` Included or excluded ad unit id. |\n| ### `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. |"]]