UserData

保存使用者 ID 和屬性的使用者資料。

JSON 表示法
{
  "userIdentifiers": [
    {
      object (UserIdentifier)
    }
  ],
  "transactionAttribute": {
    object (TransactionAttribute)
  },
  "userAttribute": {
    object (UserAttribute)
  }
}
欄位
userIdentifiers[]

object (UserIdentifier)

使用者識別資訊。必填。

transactionAttribute

object (TransactionAttribute)

與使用者相關聯的其他交易/屬性。更新商店銷售資料時,此為必填屬性。

userAttribute

object (UserAttribute)

與使用者相關聯的其他屬性。更新目標顧客比對屬性時為必填。這類交易的有效期限為 540 天。

TransactionAttribute

商店銷售交易的屬性。

JSON 表示法
{
  "storeAttribute": {
    object (StoreAttribute)
  },
  "itemAttribute": {
    object (ItemAttribute)
  },
  "transactionDateTime": string,
  "transactionAmountMicros": number,
  "currencyCode": string,
  "conversionAction": string,
  "orderId": string,
  "customValue": string
}
欄位
storeAttribute

object (StoreAttribute)

儲存交易屬性。僅限許可清單中的客戶存取。

itemAttribute

object (ItemAttribute)

交易的項目屬性。

transactionDateTime

string

交易發生時的時間戳記。必要欄位。格式為「YYYY-MM-DD HH:MM:SS[+/-HH:MM]」,其中+/-HH:MM] 是與世界標準時間時區的選用時區偏移值。如未提供偏移值,API 會使用帳戶的時區做為預設值。範例:「2018-03-05 09:15:00」或「2018-02-01 14:34:30+03:00」

transactionAmountMicros

number

交易金額 (以百萬分之一為單位)。必要欄位。以百萬分之一為單位的交易金額必須大於 1000。如果您提供了 item Attributes,表示它代表項目的總價值,也就是將每項商品的單價乘以 ItemAttributes 中提供的數量。

currencyCode

string

交易貨幣代碼。使用的是 ISO 4217 三個字母的代碼。這是必填欄位。

conversionAction

string

要回報轉換的目標轉換動作資源名稱。這是必填欄位。

orderId

string

交易訂單 ID。僅限許可清單中的客戶存取。

customValue

string

每筆交易的自訂變數值。僅限許可清單中的客戶存取。

StoreAttribute

儲存交易屬性。

JSON 表示法
{
  "storeCode": string
}
欄位
storeCode

string

商家代碼:https://support.google.com/business/answer/3370250#storecode

ItemAttribute

交易的項目屬性。

JSON 表示法
{
  "itemId": string,
  "countryCode": string,
  "languageCode": string,
  "quantity": string,
  "merchantId": string
}
欄位
itemId

string

產品的專屬 ID。這個值可以是 Merchant Center 項目 ID 或全球交易品項識別碼 (GTIN)。

countryCode

string

與上傳商品所屬動態饋給相關聯的國家/地區通用語言代碼資料存放區 (CLDR) 地域代碼。詳情請參閱 https://developers.google.com/google-ads/api/reference/data/codes-formats#country-codes

languageCode

string

與上傳商品所在動態饋給相關聯的語言 ISO 639-1 代碼

quantity

string (int64 format)

售出商品數量。如果沒有另外設定,預設值為 1。

merchantId

string (int64 format)

Merchant Center 帳戶的 ID。

UserAttribute

使用者屬性,只能與「CUSTOMER_MATCH_WITH_ATTRIBUTES」工作類型搭配使用。

JSON 表示法
{
  "lastPurchaseDateTime": string,
  "averagePurchaseCount": integer,
  "averagePurchaseValueMicros": string,
  "acquisitionDateTime": string,
  "lifecycleStage": string,
  "firstPurchaseDateTime": string,
  "eventAttribute": [
    {
      object (EventAttribute)
    }
  ],
  "lifetimeValueMicros": string,
  "lifetimeValueBucket": integer,
  "shoppingLoyalty": {
    object (ShoppingLoyalty)
  }
}
欄位
lastPurchaseDateTime

string

使用者上次購物的時間戳記。格式為 YYYY-MM-DD HH:MM:SS[+/-HH:MM],其中+/-HH:MM] 是與世界標準時間時區的選用時區偏移值。如未提供偏移值,API 會使用帳戶的時區做為預設值。

averagePurchaseCount

integer

廣告客戶定義了使用者在 30 天內的平均購買次數,

averagePurchaseValueMicros

string (int64 format)

廣告主定義了使用者的平均購物價值 (以百萬分之一為單位)。

acquisitionDateTime

string

招攬到使用者的時間戳記。格式為 YYYY-MM-DD HH:MM:SS[+/-HH:MM],其中+/-HH:MM] 是與世界標準時間時區的選用時區偏移值。如未提供偏移值,API 會使用帳戶的時區做為預設值。

lifecycleStage

string

選用設定。由廣告主定義的使用者生命週期階段。可接受的值為「待開發客戶」、「有效」和「流失」。

firstPurchaseDateTime

string

選用設定。使用者首次購買的時間戳記。格式為 YYYY-MM-DD HH:MM:SS[+/-HH:MM],其中+/-HH:MM] 是與世界標準時間時區的選用時區偏移值。如未提供偏移值,API 會使用帳戶的時區做為預設值。

eventAttribute[]

object (EventAttribute)

選用設定。廣告客戶定義的事件及其屬性。巢狀欄位中的所有值皆為必填。這個欄位目前仍處於 Beta 版測試階段。

lifetimeValueMicros

string (int64 format)

由廣告主定義的使用者生命週期價值。

lifetimeValueBucket

integer

廣告主為使用者定義的生命週期價值範圍。生命週期值範圍的有效範圍介於 1 (低) 到 10 (高) 之間,但接受 0 的移除作業除外。

shoppingLoyalty

object (ShoppingLoyalty)

購物忠誠度相關資料。Google 購物會使用這項資料,為使用者提供更優質的體驗。僅限經使用者同意允許清單中的商家存取。

ShoppingLoyalty

購物忠誠度相關資料。Google 購物會使用這項資料,為使用者提供更優質的體驗。僅限許可清單中的商家存取。

JSON 表示法
{
  "loyaltyTier": string
}
欄位
loyaltyTier

string

會員層級。這是任意形式的字串,因為每個商家都有自己的會員方案系統。例如,這可以是介於 1 到 10 之間的數字,也可以是「Golden」或「Silver」等字串,甚至是空字串「"」。

EventAttribute

廣告客戶定義的事件及其屬性。巢狀欄位中的所有值皆為必填。

JSON 表示法
{
  "event": string,
  "eventDateTime": string,
  "itemAttribute": [
    {
      object (EventItemAttribute)
    }
  ]
}
欄位
event

string

必要欄位。要用於再行銷的廣告主定義事件。可接受的值為「已瀏覽」、「購物車」、「已購買」和「建議」。

eventDateTime

string

必要欄位。事件發生時的時間戳記。格式為 YYYY-MM-DD HH:MM:SS[+/-HH:MM],其中+/-HH:MM] 是與世界標準時間時區的選用時區偏移值。如未提供偏移值,API 會使用帳戶的時區做為預設值。

itemAttribute[]

object (EventItemAttribute)

必要欄位。事件的項目屬性。

EventItemAttribute

目標客戶比對的事件項目屬性。

JSON 表示法
{
  "itemId": string
}
欄位
itemId

string

選用設定。產品的專屬 ID。這個值可以是 Merchant Center 項目 ID 或全球交易品項識別碼 (GTIN)。