We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/profile/user

Retrieves a suitably authorized slice of a given user's interest profile. The returned profile data will have been gathered from within the network of sites that the client has access to. This includes data from, e.g., custom taxonomies and custom parameters.

The user must be authenticated and have read access to a site/site group associated with the customer's data.

Request

The request object has the following fields:

Name

Type

Required

Description

id

String

Yes

Identifies the user whose user profile should be returned.

type

String

Yes

The type of user identifier, i.e., tells us how to interpret id. The value 'cx' indicates a Cxense-specific identifier, either an internal cross-site user id returned from an API such as

/traffic/data

, or a site-specific id obtained from cX.getUserId() function call from cx.js. Customer-specific identifiers via a customer-assigned prefix are also possible.

groups

Array of Strings

No

A list of strings that specify profile item groups to keep in the returned profile (see below for descriptions of the profile field in the response object). If not specified, all groups available for the user will be returned. Group specifications may enable server-side optimizations on Cxense's side, which can lead to a quicker response.

recent

Boolean

No

Returns quickly if this user has not been seen recently. Cxense stores user profile information in many storage layers, where the most recently seen profiles are the quickest profiles to retrieve. In an interactive session where events are generated (and as a consequence the user profile is updated and considered a fresh profile), it may be more appropriate to return quickly than wait for a complete response on the first page view.

identityTypes

Array of Strings

No

A set of customer-specific identifier types. If a corresponding customer identifier exists for the user, it will be included in the response.In order for this to work, the identifier would first have been added through the

addExternalId()

Javascript API, or through

/profile/user/external/link/update

.

Response

The response object has the following fields:

Name

Type

Description

id

String

The user identifier as specified in the request.

type

String

The user identifier type as specified in the request.

profile

Array of Object

Array of profile objects containing the available parts of the user profile. User profile objects have the same structure as content profile objects, defined

here

.

identities

Array of Object

The list of customer-specific identities the user is known as. Only present if identityTypes was specified in the request. A single value is returned for each of the identity types where a match was found. An empty array is returned if no identities were found for the specified identity types.

The count value returned for a group will always be 1 for user profile slices. This may change in the future.

Examples

Bash
$ python cx.py /profile/user '{"id":"134483293348982983x7","type":"cx"}'
{

 "id": "134483293348982983x7",
 "type": "cx",
 "profile" :[
 {
 "groups": [
 {
 "count":1,
 "group":"xyz-cars",
 "weight":0.8671875
 }
 ],
 "item": "toyota"
 },
 {
 "groups": [
 {
 "count":1,
 "group":"xyz-location",
 "weight":0.96875
 },
 {
 "count":1,
 "group":"xyz-product",
 "weight":0.96875
 }
 ],
 "item": "granada"
 }]
}

Last updated: