- 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:
-
signal
has animpressionSignal
ofSITE_ID
. -
comparisonOperator
is set toEQUAL
. -
comparisonValue
is 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 |
signal
. The signal used to evaluate rules. signal
can be only one of the following:impressionSignal
enum (
ImpressionSignal
)
Signal based on impressions.
clickSignal
activeViewSignal
enum (
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 |
value
. The value to compare the signal to. value
can be only one of the following:int64Value
string ( int64
format)
Integer value.
doubleValue
number
Double value.
stringValue
string
String value.
boolValue
boolean
Boolean value.
creativeDimensionValue
object (
Dimensions
)
Creative dimension value.
dayAndTimeValue
object (
DayAndTime
)
Day and time value. Only TIME_ZONE_RESOLUTION_END_USER
is supported.
deviceTypeValue
enum (
RuleDeviceType
)
Device type value.
onScreenPositionValue
enum (
OnScreenPosition
)
Ad position value.
environmentValue
enum (
Environment
)
Environment value.
exchangeValue
enum (
Exchange
)
Exchange value.
videoPlayerSizeValue
enum (
VideoPlayerSize
)
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 |
signal
. The base signal used to generate the value. signal
can be only one of the following:activeViewSignal
enum (
ActiveViewSignal
)
Signal based on active views. Only TIME_ON_SCREEN
is supported.
This field is only supported for allowlisted partners.
floodlightActivityConversionSignal
object (
FloodlightActivityConversionSignal
)
Signal based on floodlight conversion events.
This field is only supported for allowlisted partners.
number
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. |