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

/profile/user/external/link/update

Register a new identity-mapping. If the identifier of the specified type already exists, then the cxid is mapped to that one, else the new mapping is set to point to the cxid. This makes it possible to link customer identifiers (such as a subscriber number) to the browser and device the user is using.

The server side version of the addExternalId()Javascript api call described in the Event data documentation, with more information on the use-case.

The user must be authenticated and have write permissions to a sitegroup with the customer prefix registered.

As long as the linking between the external user identifier and the internal user identifier happens at least once, this is remembered server-side. The linking information is lost, however, if the server-side mapping is cleared (e.g., for capacity reasons users for which no activity has been observed for a very long time might have their mappings purged). The linking operation should happen at least once a month, preferably more often. This ensures that the server-side correctly distinguishes between active and inactive identities.

Request

The request object has the following fields:

Name

Type

Required

Description

id

String

Yes

The identifier value to register. Internal identifiers are a maximum of 64 characters using digits (0 to 9), letters A to Z, a to z, and the special characters in =@+-_. . External identifiers are a maximum of 128 characters using digits (0 to 9), characters A to Z, a to z, and the special characters !#$%&()*+,-./;<=>?@[]^_{}~ and the pipe character.

type

String

Yes

The customer-specific identifier type as registered with Cxense, i.e. a

customer prefix

.

cxid

String

Yes

The Cxense-specific user 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.

Response

The response object has the following fields:

Name

Type

Description

id

String

The identifier that was successfully added.

type

String

The type of identifier - equal to the type parameter from the request.

Examples

Linking the customer identifier "subscriber14" of the type "xyz" (type registered with Cxense) to the browser that has the Cxense identifier 12343123411343595.

$ python cx.py /profile/user/external/link/update '{"id":"subscriber14", "type":"xyz", "cxid":"12343123411343595"}'
{
 "id":"subscriber14",
 "type":"xyz"
}

Last updated: