CDPGuidesSupport

Personalization Properties

Create visitor properties from tracked events for behavior-based personalization and experiment targeting.

Create rules that accumulate a scalar visitor property from the next matching tracked event. Use those properties in personalization and experiment targeting, or read them through window.ours_experiments.getVisitorContext().

For example, a page_view whose event.context.current_url contains /pricing can set visited_pricing: true. On the visitor's next full page load, target a personalization experience on the bare visited_pricing key.

Rules do not query arbitrary historical event data at evaluation time. They start accumulating after creation and persist the derived value for later page loads.

GET/rest/v1/personalization-properties

GET
/rest/v1/personalization-properties
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

limit?|

Maximum number of items to return. Defaults to 25; values below 1 are clamped to 1 and values above 100 are clamped to 100.

cursor?string

Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.

experimentSettingsId*string

Required. List properties belonging to this experiment settings record. Get the id from GET /rest/v1/experiment-settings.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/personalization-properties?experimentSettingsId=08524dc8-5289-48e8-bf40-b3a7cfa6ca0a"
{  "entities": [    {      "id": "string",      "experimentSettingsId": "string",      "propertyKey": "visited_pricing",      "accumulator": "set_true",      "triggerEventName": "page_view",      "triggerConditions": [        {          "field": "event.context.current_url",          "operator": "contains",          "value": "/pricing"        }      ],      "valueField": "event.context.utm_campaign",      "status": "Enabled",      "createdAt": "string",      "updatedAt": "string"    }  ],  "pagination": {    "nextCursor": "string",    "hasMore": true  }}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

POST/rest/v1/personalization-properties

POST
/rest/v1/personalization-properties
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/rest/v1/personalization-properties" \  -H "Content-Type: application/json" \  -d '{    "experimentSettingsId": "08524dc8-5289-48e8-bf40-b3a7cfa6ca0a",    "propertyKey": "visited_pricing",    "accumulator": "set_true",    "triggerEventName": "page_view"  }'
{  "id": "string",  "experimentSettingsId": "string",  "propertyKey": "visited_pricing",  "accumulator": "set_true",  "triggerEventName": "page_view",  "triggerConditions": [    {      "field": "event.context.current_url",      "operator": "contains",      "value": "/pricing"    }  ],  "valueField": "event.context.utm_campaign",  "status": "Enabled",  "createdAt": "string",  "updatedAt": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

GET/rest/v1/personalization-properties/{id}

GET
/rest/v1/personalization-properties/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/personalization-properties/string"
{  "id": "string",  "experimentSettingsId": "string",  "propertyKey": "visited_pricing",  "accumulator": "set_true",  "triggerEventName": "page_view",  "triggerConditions": [    {      "field": "event.context.current_url",      "operator": "contains",      "value": "/pricing"    }  ],  "valueField": "event.context.utm_campaign",  "status": "Enabled",  "createdAt": "string",  "updatedAt": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

PATCH/rest/v1/personalization-properties/{id}

PATCH
/rest/v1/personalization-properties/{id}
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/rest/v1/personalization-properties/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "experimentSettingsId": "string",  "propertyKey": "visited_pricing",  "accumulator": "set_true",  "triggerEventName": "page_view",  "triggerConditions": [    {      "field": "event.context.current_url",      "operator": "contains",      "value": "/pricing"    }  ],  "valueField": "event.context.utm_campaign",  "status": "Enabled",  "createdAt": "string",  "updatedAt": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

DELETE/rest/v1/personalization-properties/{id}

DELETE
/rest/v1/personalization-properties/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/rest/v1/personalization-properties/string"
true
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

How is this guide?