UserData

User data holding user identifiers and attributes.

JSON representation
{
  "userIdentifiers": [
    {
      object (UserIdentifier)
    }
  ],
  "transactionAttribute": {
    object (TransactionAttribute)
  },
  "userAttribute": {
    object (UserAttribute)
  },
  "consent": {
    object (Consent)
  }
}
Fields
userIdentifiers[]

object (UserIdentifier)

User identification info. Required.

transactionAttribute

object (TransactionAttribute)

Additional transactions/attributes associated with the user. Required when updating store sales data.

userAttribute

object (UserAttribute)

Additional attributes associated with the user. Required when updating customer match attributes. These have an expiration of 540 days.

consent

object (Consent)

The consent setting for the user. Customer match will ignore this field and return a warning.

TransactionAttribute

Attribute of the store sales transaction.

JSON representation
{
  "storeAttribute": {
    object (StoreAttribute)
  },
  "itemAttribute": {
    object (ItemAttribute)
  },
  "transactionDateTime": string,
  "transactionAmountMicros": number,
  "currencyCode": string,
  "conversionAction": string,
  "orderId": string,
  "customValue": string
}
Fields
storeAttribute

object (StoreAttribute)

Store attributes of the transaction. Accessible only to customers on the allow-list.

itemAttribute

object (ItemAttribute)

Item attributes of the transaction.

transactionDateTime

string

Timestamp when transaction occurred. Required. The format is "YYYY-MM-DD HH:MM:SS[+/-HH:MM]", where [+/-HH:MM] is an optional timezone offset from UTC. If the offset is absent, the API will use the account's timezone as default. Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30+03:00"

transactionAmountMicros

number

Transaction amount in micros. Required. Transaction amount in micros needs to be greater than 1000. If item Attributes are provided, it represents the total value of the items, after multiplying the unit price per item by the quantity provided in the ItemAttributes.

currencyCode

string

Transaction currency code. ISO 4217 three-letter code is used. Required.

conversionAction

string

The resource name of conversion action to report conversions to. Required.

orderId

string

Transaction order id. Accessible only to customers on the allow-list.

customValue

string

Value of the custom variable for each transaction. Accessible only to customers on the allow-list.

StoreAttribute

Store attributes of the transaction.

JSON representation
{
  "storeCode": string
}
Fields
storeCode

string

Store code from https://support.google.com/business/answer/3370250#storecode

ItemAttribute

Item attributes of the transaction.

JSON representation
{
  "itemId": string,
  "countryCode": string,
  "languageCode": string,
  "quantity": string,
  "merchantId": string
}
Fields
itemId

string

A unique identifier of a product. It can be either the Merchant Center Item ID or GTIN (Global Trade Item Number).

countryCode

string

Common Locale Data Repository (CLDR) territory code of the country associated with the feed where your items are uploaded. See https://developers.google.com/google-ads/api/reference/data/codes-formats#country-codes for more information.

languageCode

string

ISO 639-1 code of the language associated with the feed where your items are uploaded

quantity

string (int64 format)

The number of items sold. Defaults to 1 if not set.

merchantId

string (int64 format)

ID of the Merchant Center Account.

UserAttribute

User attribute, can only be used with CUSTOMER_MATCH_WITH_ATTRIBUTES job type.

JSON representation
{
  "lastPurchaseDateTime": string,
  "averagePurchaseCount": integer,
  "averagePurchaseValueMicros": string,
  "acquisitionDateTime": string,
  "lifecycleStage": string,
  "firstPurchaseDateTime": string,
  "eventAttribute": [
    {
      object (EventAttribute)
    }
  ],
  "lifetimeValueMicros": string,
  "lifetimeValueBucket": integer,
  "shoppingLoyalty": {
    object (ShoppingLoyalty)
  }
}
Fields
lastPurchaseDateTime

string

Timestamp of the last purchase made by the user. The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an optional timezone offset from UTC. If the offset is absent, the API will use the account's timezone as default.

averagePurchaseCount

integer

Advertiser defined average number of purchases that are made by the user in a 30 day period.

averagePurchaseValueMicros

string (int64 format)

Advertiser defined average purchase value in micros for the user.

acquisitionDateTime

string

Timestamp when the user was acquired. The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an optional timezone offset from UTC. If the offset is absent, the API will use the account's timezone as default.

lifecycleStage

string

Optional. Advertiser defined lifecycle stage for the user. The accepted values are "Lead", "Active" and "Churned".

firstPurchaseDateTime

string

Optional. Timestamp of the first purchase made by the user. The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an optional timezone offset from UTC. If the offset is absent, the API will use the account's timezone as default.

eventAttribute[]

object (EventAttribute)

Optional. Advertiser defined events and their attributes. All the values in the nested fields are required. Currently this field is in beta.

lifetimeValueMicros

string (int64 format)

Advertiser defined lifetime value for the user.

lifetimeValueBucket

integer

Advertiser defined lifetime value bucket for the user. The valid range for a lifetime value bucket is from 1 (low) to 10 (high), except for remove operation where 0 will also be accepted.

shoppingLoyalty

object (ShoppingLoyalty)

The shopping loyalty related data. Shopping utilizes this data to provide users with a better experience. Accessible only to merchants on the allow-list with the user's consent.

ShoppingLoyalty

The shopping loyalty related data. Shopping utilizes this data to provide users with a better experience. Accessible only to merchants on the allow-list.

JSON representation
{
  "loyaltyTier": string
}
Fields
loyaltyTier

string

The membership tier. It is a free-form string as each merchant may have their own loyalty system. For example, it could be a number from 1 to 10, or a string such as "Golden" or "Silver", or even empty string "".

EventAttribute

Advertiser defined events and their attributes. All the values in the nested fields are required.

JSON representation
{
  "event": string,
  "eventDateTime": string,
  "itemAttribute": [
    {
      object (EventItemAttribute)
    }
  ]
}
Fields
event

string

Required. Advertiser defined event to be used for remarketing. The accepted values are "Viewed", "Cart", "Purchased" and "Recommended".

eventDateTime

string

Required. Timestamp at which the event happened. The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an optional timezone offset from UTC. If the offset is absent, the API will use the account's timezone as default.

itemAttribute[]

object (EventItemAttribute)

Required. Item attributes of the event.

EventItemAttribute

Event Item attributes of the Customer Match.

JSON representation
{
  "itemId": string
}
Fields
itemId

string

Optional. A unique identifier of a product. It can be either the Merchant Center Item ID or GTIN (Global Trade Item Number).