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],{"火星郵輪","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

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

MatchingFunctionOperator

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

列舉
UNSPECIFIED 未指定。
UNKNOWN 僅適用於傳回值。代表此版本中未知的值。
IN IN 運算子。
IDENTITY IDENTITY 運算子。
EQUALS EQUALS 運算子
AND 使用兩個以上屬於 FunctionOperand 類型的運算元的運算子,並檢查所有運算元評估為 true。至於廣告格式相關函式,所有運算元都必須位於 leftOperands 中。
CONTAINS_ANY 如果 leftOperands 中的元素包含 RightOperands 中的任何元素,會傳回 true 的運算子。如果沒有,則傳回 false。右側運算元必須包含 1 到 3 個常數運算。

運算元

比對函式中的運算元。

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。