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.

UserIdentifier

Hashed user identifying information.

JSON representation
{
  "userIdentifierSource": enum (UserIdentifierSource),

  // Union field identifier can be only one of the following:
  "hashedEmail": string,
  "hashedPhoneNumber": string,
  "mobileId": string,
  "thirdPartyUserId": string,
  "addressInfo": {
    object (OfflineUserAddressInfo)
  }
  // End of list of possible types for union field identifier.
}
Fields
userIdentifierSource

enum (UserIdentifierSource)

Source of the user identifier when the upload is from Store Sales third party partners.

Union field identifier. Exactly one must be specified. identifier can be only one of the following:
hashedEmail

string

Hashed email address using SHA-256 hash function after normalization.

hashedPhoneNumber

string

Hashed phone number using SHA-256 hash function after normalization (E164 standard).

mobileId

string

Mobile device ID (advertising ID/IDFA).

thirdPartyUserId

string

Advertiser-assigned user ID for Customer Match upload, or third-party-assigned user ID for SSD.

addressInfo

object (OfflineUserAddressInfo)

Address information.

UserIdentifierSource

The type of user identifier source for offline Store Sales third party uploads.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version
FIRST_PARTY Indicates that the user identifier was provided by the first party (advertiser).
THIRD_PARTY Indicates that the user identifier was provided by the third party (partner).

OfflineUserAddressInfo

Address identifier of offline data.

JSON representation
{
  "hashedFirstName": string,
  "hashedLastName": string,
  "city": string,
  "state": string,
  "countryCode": string,
  "postalCode": string
}
Fields
hashedFirstName

string

First name of the user, which is hashed as SHA-256 after normalized (Lowercase all characters; Remove any extra spaces before, after, and in between).

hashedLastName

string

Last name of the user, which is hashed as SHA-256 after normalized (lower case only and no punctuation).

city

string

City of the address. Only accepted for Store Sales Direct data.

state

string

State code of the address. Only accepted for Store Sales Direct data.

countryCode

string

2-letter country code in ISO-3166-1 alpha-2 of the user's address.

postalCode

string

Postal code of the user's address.

TransactionAttribute

Attribute of the store sales transaction.

JSON representation
{
  "storeAttribute": {
    object (StoreAttribute)
  },
  "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.

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

UserAttribute

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

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