Caution: You are viewing documentation for the API's REST interface. Most of our official client libraries use gRPC. See the REST Introduction for details.

UserData

User data holding user identifiers and attributes.

JSON representation
{
  "userIdentifiers": [
    {
      object (UserIdentifier)
    }
  ],
  "transactionAttribute": {
    object (TransactionAttribute)
  },
  "userAttribute": {
    object (UserAttribute)
  }
}
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.

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,
  "lifetimeValueMicros": string,
  "lifetimeValueBucket": integer
}
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.

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.