AI-generated Key Takeaways
- 
          Display & Video 360 API v3 has been sunset and users should transition to v4. 
- 
          The content describes the structure of rule-based algorithms using JSON representations for various components like Rulesets, Rules, and Conditions. 
- 
          Rulesets consist of rules and specify how to aggregate their values, including a maximum value limit. 
- 
          Rules are sets of conditions that return a value based on met conditions or a defined default. 
- 
          RuleConditions are sets of signal comparisons combined with an ANDlogical operator, returning a value if the condition is true.
- JSON representation
- Ruleset
- Rule
- RuleCondition
- SignalComparison
- Signal
- ComparisonValue
- DayAndTime
- SignalValue
- FloodlightActivityConversionSignal
Rule-based algorithm.
| JSON representation | 
|---|
| { "impressionSignalRuleset": { object ( | 
| Fields | |
|---|---|
| impressionSignalRuleset | 
 Rules for the impression signals. | 
| postImpressionSignalRuleset | 
 Rules for the post-impression signals. This field is only supported for allowlisted partners. | 
| attributionModelId | 
 Attribution model for the algorithm. This field is only supported for allowlisted partners. | 
Ruleset
A ruleset consisting of a list of rules and how to aggregate the resulting values.
| JSON representation | 
|---|
| { "rules": [ { object ( | 
| Fields | |
|---|---|
| rules[] | 
 List of rules to generate the impression value. | 
| aggregationType | 
 How to aggregate values of evaluated rules. | 
| maxValue | 
 Maximum value the ruleset can evaluate to. | 
Rule
Set of conditions.
The return value of the rule is either:
- The return value for single met condition or
- The defined default return value if no conditions are met.
| JSON representation | 
|---|
| { "conditions": [ { object ( | 
| Fields | |
|---|---|
| conditions[] | 
 List of conditions in this rule. The criteria among conditions should be mutually exclusive. | 
| defaultReturnValue | 
 The default return value applied when none of the conditions are met. | 
RuleCondition
Set of signal comparisons. Equivalent of an if statement.
| JSON representation | 
|---|
| { "signalComparisons": [ { object ( | 
| Fields | |
|---|---|
| signalComparisons[] | 
 List of comparisons that build  | 
| returnValue | 
 The value returned if the  | 
SignalComparison
A single comparison. The comparison compares the signal to the comparisonValue.
The comparison of siteId==123 is represented with the following field values:
- signalhas an- impressionSignalof- SITE_ID.
- comparisonOperatoris set to- EQUAL.
- comparisonValueis set to 123.
| JSON representation | 
|---|
| { "signal": { object ( | 
| Fields | |
|---|---|
| signal | 
 Signal to compare. | 
| comparisonOperator | 
 Operator used to compare the two values. In the resulting experession, the  | 
| comparisonValue | 
 Value to compare signal to. | 
Signal
Signal used to evaluate rules.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field signal. The signal used to evaluate rules.signalcan be only one of the following: | |
| impressionSignal | 
 Signal based on impressions. | 
| clickSignal | 
 Signal based on clicks. This field is only supported for allowlisted partners. | 
| activeViewSignal | 
 Signal based on active views. This field is only supported for allowlisted partners. | 
ComparisonValue
A value to compare the signal to.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field value. The value to compare the signal to.valuecan be only one of the following: | |
| int64Value | 
 Integer value. | 
| doubleValue | 
 Double value. | 
| stringValue | 
 String value. | 
| boolValue | 
 Boolean value. | 
| creativeDimensionValue | 
 Creative dimension value. | 
| dayAndTimeValue | 
 Day and time value. Only  | 
| deviceTypeValue | 
 Device type value. | 
| onScreenPositionValue | 
 Ad position value. | 
| environmentValue | 
 Environment value. | 
| exchangeValue | 
 Exchange value. | 
| videoPlayerSizeValue | 
 Video player size value. This field is only supported for allowlisted partners. | 
DayAndTime
Representation of time defined by day of the week and hour of the day.
| JSON representation | 
|---|
| { "dayOfWeek": enum ( | 
| Fields | |
|---|---|
| dayOfWeek | 
 Required. Day of the week. | 
| hourOfDay | 
 Required. Hour of the day. | 
| timeZoneResolution | 
 Required. The mechanism used to determine the relevant timezone. | 
SignalValue
Adjusted value of the signal used for rule evaluation.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field signal. The base signal used to generate the value.signalcan be only one of the following: | |
| activeViewSignal | 
 Signal based on active views. Only  This field is only supported for allowlisted partners. | 
| floodlightActivityConversionSignal | 
 Signal based on floodlight conversion events. This field is only supported for allowlisted partners. | 
| number | 
 Value to use as result. | 
FloodlightActivityConversionSignal
The rule to score impressions based on Floodlight conversion events.
| JSON representation | 
|---|
| { "floodlightActivityId": string, "countingMethod": enum ( | 
| Fields | |
|---|---|
| floodlightActivityId | 
 Required. Id of the floodlight activity. | 
| countingMethod | 
 Required. The way to acquire value from the floodlight activity, for example, count of the conversion. | 
| conversionCounting | 
 Required. The type of conversions to be used in impression value computation, for example, post-click conversions. |