type FirstPartyAudienceSegmentRule (v202408)
Stay organized with collections
Save and categorize content based on your preferences.
Service
AudienceSegmentService
Rule of a FirstPartyAudienceSegment that defines user's eligibility criteria to be part
of a segment.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202408
Field
|
inventoryRule
|
InventoryTargeting
Specifies the inventory (i.e. ad units and placements) that are part of the rule of a FirstPartyAudienceSegment. This attribute is required.
|
customCriteriaRule
|
CustomCriteriaSet
Specifies the collection of custom criteria that are part of the
rule of a FirstPartyAudienceSegment.
Once the FirstPartyAudienceSegment is updated or modified with custom
criteria, the server may return a normalized, but equivalent
representation of the custom criteria rule.
The resulting custom criteria rule would be of the form:
|
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\u003eFirstPartyAudienceSegmentRule defines the criteria for users to be included in a FirstPartyAudienceSegment.\u003c/p\u003e\n"],["\u003cp\u003eIt uses InventoryTargeting to specify eligible ad units and placements.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes CustomCriteriaSet to define custom criteria for segment membership, supporting up to three levels of criteria logic.\u003c/p\u003e\n"],["\u003cp\u003eThe custom criteria rule structure is normalized by the server, ensuring logical consistency while potentially altering the original representation.\u003c/p\u003e\n"]]],["The `RuleBasedFirstPartyAudienceSegment` defines eligibility criteria for a `FirstPartyAudienceSegment`. Key components include `inventoryRule`, which specifies ad units and placements, and `customCriteriaRule`, defining custom criteria. `customCriteriaRule` can have up to three levels: the top level uses OR logic, the second uses AND, and the third level contains `CustomCriteria`. The `AudienceSegmentService` in the `v202408` namespace manages these rules for defining user segments.\n"],null,["# type FirstPartyAudienceSegmentRule (v202408)\n\n**Service** \n**AudienceSegmentService** **Dependencies** \n[RuleBasedFirstPartyAudience...](/ad-manager/api/reference/v202408/AudienceSegmentService.RuleBasedFirstPartyAudienceSegment \"RuleBasedFirstPartyAudienceSegment\") \n▼\n**FirstPartyAudienceSegmentRule**\n\nRule of a [FirstPartyAudienceSegment](/ad-manager/api/reference/v202408/AudienceSegmentService.FirstPartyAudienceSegment) that defines user's eligibility criteria to be part\nof a segment.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202408`\n\n| Field ----- ||\n|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `inventoryRule` | ` `[InventoryTargeting](/ad-manager/api/reference/v202408/AudienceSegmentService.InventoryTargeting)` ` Specifies the inventory (i.e. ad units and placements) that are part of the rule of a [FirstPartyAudienceSegment](/ad-manager/api/reference/v202408/AudienceSegmentService.FirstPartyAudienceSegment). This attribute is required. |\n| ### `customCriteriaRule` | ` `[CustomCriteriaSet](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteriaSet)` ` Specifies the collection of custom criteria that are part of the rule of a [FirstPartyAudienceSegment](/ad-manager/api/reference/v202408/AudienceSegmentService.FirstPartyAudienceSegment). Once the [FirstPartyAudienceSegment](/ad-manager/api/reference/v202408/AudienceSegmentService.FirstPartyAudienceSegment) is updated or modified with custom criteria, the server may return a normalized, but equivalent representation of the custom criteria rule. `customCriteriaRule`will have up to three levels including itself. - The top level [CustomCriteriaSet](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteriaSet) i.e. the `customTargeting` object can only contain a [CustomCriteriaSet.LogicalOperator.OR](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteriaSet.LogicalOperator#OR) of all its children. - The second level of [CustomCriteriaSet](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteriaSet) objects can only contain [CustomCriteriaSet.LogicalOperator.AND](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteriaSet.LogicalOperator#AND) of all their children. If a [CustomCriteria](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteria) is placed on this level, the server will wrap it in a [CustomCriteriaSet](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteriaSet). - The third level can only comprise of [CustomCriteria](/ad-manager/api/reference/v202408/AudienceSegmentService.CustomCriteria) objects. The resulting custom criteria rule would be of the form: \u003cbr /\u003e |"]]