The user object
The user object contains information about a logged-in user, like their internal ID, email address, postal address, and so on.
The user object can be placed in the context object or directly in the value object. We recommend that you place it in context, as the value.user object is deprecated.
The following are the attributes supported by the user object:
|
Name |
Type |
Description |
Value |
|---|---|---|---|
|
|
string |
Required. Any persistent ID you use to identify the user. Can be a primary key in a user database, or an ID in any system used to manage user info. Important
|
n/a |
|
|
string |
Optional. User's email address. |
n/a |
|
|
string |
Optional. User's Facebook ID. |
n/a |
|
|
string |
Required when using email. User's opaque email ID as identified by your email service provider. |
n/a |
|
|
Optional. User's postal address information. This is usually also the billing address. Note This can be different from the |
n/a | |
|
|
array of strings |
Optional. Custom groups or group segments that are assigned to the user. Strings are free-form. |
n/a |
|
|
string |
Optional. User's gender. |
|
|
|
object |
Optional. A map of customer-specific user attributes. |
n/a |
The following is an example of the user object:
"user": {
"id": "user-1234",
"email": "[email protected]",
"eid": "<email_identifier>",
"address": {
"address_line_1": "123 Main Street",
"address_line_2": "apartment 123",
"state": "CA",
"zip": "90210",
"country": "US"
},
"groups": ["group1", "group2"],
"gender": "female",
"addn_attributes": {
"<attr_key1>": "<attr_value1>",
"<attr_key2>": "<attr_value2>",
...
}
}