MatchingFunction

與客戶資訊提供、廣告活動資訊提供或廣告群組資訊提供相關聯的比對函式。比對函式可用來篩選選定的動態饋給項目組合。

JSON 表示法
{
  "operator": enum (MatchingFunctionOperator),
  "leftOperands": [
    {
      object (Operand)
    }
  ],
  "rightOperands": [
    {
      object (Operand)
    }
  ],
  "functionString": string
}
欄位
operator

enum (MatchingFunctionOperator)

函式的運算子。

leftOperands[]

object (Operand)

方程式左側的運算元。這個運算元也可用於單一運算元運算式,例如 NOT。

rightOperands[]

object (Operand)

方程式右側的運算元。

functionString

string

函式的字串表示法。

例:

  1. IDENTITY(true) 或 IDENTITY(false)。放送所有動態饋給項目,或是未放送任何動態饋給項目。
  2. EQUALS(CONTEXT.DEVICE,"Mobile")
  3. IN(FEED_ITEM_ID,{1000001,1000002,1000003})
  4. CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"})
  5. AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile"))

詳情請參閱 https://developers.google.com/google-ads/api/docs/extensions/feeds/matching-functions

請注意,由於多個字串可能代表相同的基礎函式 (例如空白字元和單引號或雙引號),因此傳回的值不一定會與 change 要求中傳送的字串相同。

MatchingFunctionOperator

比對函式中可能的運算子。

列舉
UNSPECIFIED 未指定。
UNKNOWN 僅用於傳回值。代表這個版本未知的值。
IN IN 運算子。
IDENTITY IDENTITY 運算子。
EQUALS EQUALS 運算子
AND 這個運算子能接受兩個以上類型為 FunctionOperand 的運算元,並檢查所有運算元評估結果為 true。如果是與廣告格式相關的函式,所有運算元都必須在左運算元。
CONTAINS_ANY 如果 leftOperands 中的元素包含任何元素,則會傳回 true 的運算子。如果沒有,則傳回 false。右側運算元必須包含至少 1 到 3 個 ConstantOperands。

運算元

比對函式中的運算元。

JSON 表示法
{

  // Union field function_argument_operand can be only one of the following:
  "constantOperand": {
    object (ConstantOperand)
  },
  "feedAttributeOperand": {
    object (FeedAttributeOperand)
  },
  "functionOperand": {
    object (FunctionOperand)
  },
  "requestContextOperand": {
    object (RequestContextOperand)
  }
  // End of list of possible types for union field function_argument_operand.
}
欄位
聯集欄位 function_argument_operand。可用於比對函式中的不同運算元。必要欄位。function_argument_operand 只能是下列其中一項:
constantOperand

object (ConstantOperand)

比對函式中的常數運算元。

feedAttributeOperand

object (FeedAttributeOperand)

這個運算元會指定動態饋給中的動態饋給屬性。

functionOperand

object (FunctionOperand)

比對函式中的函式運算元。用於表示巢狀函式。

requestContextOperand

object (RequestContextOperand)

函式中的運算元參照要求結構定義中的值。

ConstantOperand

比對函式中的常數運算元。

JSON 表示法
{

  // Union field constant_operand_value can be only one of the following:
  "stringValue": string,
  "longValue": string,
  "booleanValue": boolean,
  "doubleValue": number
  // End of list of possible types for union field constant_operand_value.
}
欄位
聯集欄位 constant_operand_value。常數運算元值。必要欄位。constant_operand_value 只能是下列其中一項:
stringValue

string

運算元的字串值 (如果是字串類型)。

longValue

string (int64 format)

運算元的 Int64 值 (如果值是 int64 類型)。

booleanValue

boolean

運算元的布林值 (如果為布林值類型)。

doubleValue

number

如果運算元是雙精度類型,則運算元的雙精度值。

FeedAttributeOperand

比對函式中的動態饋給屬性運算元。用來表示動態饋給中的動態饋給屬性。

JSON 表示法
{
  "feedId": string,
  "feedAttributeId": string
}
欄位
feedId

string (int64 format)

相關的動態饋給。這是必填欄位。

feedAttributeId

string (int64 format)

所參照動態饋給屬性的 ID。這是必填欄位。

FunctionOperand

比對函式中的函式運算元。用於表示巢狀函式。

JSON 表示法
{
  "matchingFunction": {
    object (MatchingFunction)
  }
}
欄位
matchingFunction

object (MatchingFunction)

這個運算元中保留的比對函式。

RequestContextOperand

函式中的運算元參照要求結構定義中的值。

JSON 表示法
{
  "contextType": enum (MatchingFunctionContextType)
}
欄位
contextType

enum (MatchingFunctionContextType)

在要求結構定義中要參照的值類型。

MatchingFunctionContextType

在比對函式中運算元可能的結構定義類型。

列舉
UNSPECIFIED 未指定。
UNKNOWN 僅用於傳回值。代表這個版本未知的值。
FEED_ITEM_ID 要求結構定義中的動態饋給項目 ID。
DEVICE_NAME 使用的裝置 (可能的值為「Desktop」或「Mobile」)。
FEED_ITEM_SET_ID 請求結構定義中的動態饋給項目集 ID。