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\u003eCustomCriteria objects enable custom targeting based on predefined or freeform custom targeting keys.\u003c/p\u003e\n"],["\u003cp\u003eIt requires specifying the custom targeting key ID and the IDs of the custom targeting values to target.\u003c/p\u003e\n"],["\u003cp\u003eA comparison operator (IS or IS_NOT) is used to define the targeting logic.\u003c/p\u003e\n"],["\u003cp\u003eCustomCriteria is part of the ForecastService and used for custom criteria targeting in Ad Manager.\u003c/p\u003e\n"]]],["The core content describes custom criteria targeting within several services, including `AdRuleService`, `AdjustmentService`, `ForecastService`, and others. It focuses on the `CustomCriteria` object, which is used to target custom targeting keys of types `PREDEFINED` or `FREEFORM`. Key actions involve defining `keyId` (custom targeting key's ID), `valueIds` (custom targeting value IDs), and an `operator` (`IS` or `IS_NOT`) to specify the comparison method. This information is used within the namespace `https://www.google.com/apis/ads/publisher/v202408`.\n"],null,["# type CustomCriteria (v202408)\n\n**Service** \n[AdRuleService](/ad-manager/api/reference/v202408/AdRuleService.CustomCriteria) [AdjustmentService](/ad-manager/api/reference/v202408/AdjustmentService.CustomCriteria) [AudienceSegmentService](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteria) **ForecastService** [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/ForecastService.CustomCriteriaNode) \n▼\n[CustomCriteriaLeaf](/ad-manager/api/reference/v202408/ForecastService.CustomCriteriaLeaf) \n▼\n[AudienceSegmentCriteria](/ad-manager/api/reference/v202408/ForecastService.AudienceSegmentCriteria) [CmsMetadataCriteria](/ad-manager/api/reference/v202408/ForecastService.CmsMetadataCriteria) **CustomCriteria**\n\nA [CustomCriteria](/ad-manager/api/reference/v202408/ForecastService.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/ForecastService.CustomCriteria#keyId). This attribute is required. |\n| ### `operator` | ` `[CustomCriteria.ComparisonOp...](/ad-manager/api/reference/v202408/ForecastService.CustomCriteria.ComparisonOperator \"CustomCriteria.ComparisonOperator\")` ` The comparison operator. This attribute is required. *** ** * ** *** **Enumerations** `IS` : `IS_NOT` : \u003cbr /\u003e |"]]