type CustomCriteria (v202408)
Stay organized with collections
Save and categorize content based on your preferences.
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\u003eCustom Criteria allows for targeting using custom targeting keys of predefined or freeform types.\u003c/p\u003e\n"],["\u003cp\u003eIt involves specifying a custom targeting key and the corresponding custom targeting values for ad targeting.\u003c/p\u003e\n"],["\u003cp\u003eThe keyId field identifies the relevant custom targeting key, while valueIds specify the target values.\u003c/p\u003e\n"],["\u003cp\u003eAn operator field determines the comparison logic (IS or IS_NOT) between the key and values during targeting.\u003c/p\u003e\n"]]],["The content outlines the use of `CustomCriteria` for custom targeting within the AdRuleService. `CustomCriteria` objects target custom keys of predefined or freeform types, utilizing `keyId` for the `CustomTargetingKey` and `valueIds` for `CustomTargetingValue` objects. These criteria are implemented through `CustomCriteriaLeaf`, which inherits from `CustomCriteriaNode`. `CustomCriteria` requires a comparison operator which can be `IS` or `IS_NOT` to define the relationship between the key and values.\n"],null,["# type CustomCriteria (v202408)\n\n**Service** \n**AdRuleService** [AdjustmentService](/ad-manager/api/reference/v202408/AdjustmentService.CustomCriteria) [AudienceSegmentService](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteria) [ForecastService](/ad-manager/api/reference/v202408/ForecastService.CustomCriteria) [LineItemService](/ad-manager/api/reference/v202408/LineItemService.CustomCriteria) [NativeStyleService](/ad-manager/api/reference/v202408/NativeStyleService.CustomCriteria) [ProposalLineItemService](/ad-manager/api/reference/v202408/ProposalLineItemService.CustomCriteria) [ProposalService](/ad-manager/api/reference/v202408/ProposalService.CustomCriteria) [PublisherQueryLanguageService](/ad-manager/api/reference/v202408/PublisherQueryLanguageService.CustomCriteria) [TargetingPresetService](/ad-manager/api/reference/v202408/TargetingPresetService.CustomCriteria) [YieldGroupService](/ad-manager/api/reference/v202408/YieldGroupService.CustomCriteria) **Inheritance** \n[CustomCriteriaNode](/ad-manager/api/reference/v202408/AdRuleService.CustomCriteriaNode) \n▼\n[CustomCriteriaLeaf](/ad-manager/api/reference/v202408/AdRuleService.CustomCriteriaLeaf) \n▼\n[AudienceSegmentCriteria](/ad-manager/api/reference/v202408/AdRuleService.AudienceSegmentCriteria) [CmsMetadataCriteria](/ad-manager/api/reference/v202408/AdRuleService.CmsMetadataCriteria) **CustomCriteria**\n\nA [CustomCriteria](/ad-manager/api/reference/v202408/AdRuleService.CustomCriteria) object is used to perform custom criteria targeting on custom targeting\nkeys of type [CustomTargetingKey.Type.PREDEFINED](/ad-manager/api/reference/v202408/CustomTargetingService.CustomTargetingKey.Type#PREDEFINED) or [CustomTargetingKey.Type.FREEFORM](/ad-manager/api/reference/v202408/CustomTargetingService.CustomTargetingKey.Type#FREEFORM).\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202408`\n\n| Field ----- ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **`CustomCriteriaNode` (inherited)** ||\n| **`CustomCriteriaLeaf` (inherited)** ||\n| **`CustomCriteria`** ||\n| ### `keyId` | ` `xsd:`long` The [CustomTargetingKey.id](/ad-manager/api/reference/v202408/CustomTargetingService.CustomTargetingKey#id) of the [CustomTargetingKey](/ad-manager/api/reference/v202408/CustomTargetingService.CustomTargetingKey) object that was created using [CustomTargetingService](/ad-manager/api/reference/v202408/CustomTargetingService). This attribute is required. |\n| ### `valueIds` | ` `xsd:`long[]` The ids of [CustomTargetingValue](/ad-manager/api/reference/v202408/CustomTargetingService.CustomTargetingValue) objects to target the custom targeting key with id [CustomCriteria.keyId](/ad-manager/api/reference/v202408/AdRuleService.CustomCriteria#keyId). This attribute is required. |\n| ### `operator` | ` `[CustomCriteria.ComparisonOp...](/ad-manager/api/reference/v202408/AdRuleService.CustomCriteria.ComparisonOperator \"CustomCriteria.ComparisonOperator\")` ` The comparison operator. This attribute is required. *** ** * ** *** **Enumerations** `IS` : `IS_NOT` : \u003cbr /\u003e |"]]