How to target New and Returing Users in SSAPI
A possible way to know whether the current user is new or returning is by checking their SessionID and their UserID. Since these are defined on the Server Side in case of SSAPI implementation, then also defining the New and Returning Users should also be done on the backend.
Once the User Type is defined, you can send it as a pageAttribute in the body of the API request. Then you can use this attribute as a targeting condition for experiences by using "Custom Attribute":
To follow is an example of the API request's body:
{
"user": {
"id": "user_id"
},
"sessionId": "session_id",
"selector": {
"names": ["campaign_selector"]},
"context": {
"page": {
"type": "OTHER",
"data": [],
"location": "https://www.example.com"
},
"pageAttributes": {
"UserType": "New"
},
"options": []
}
}
Please sign in to leave a comment.
Comments
0 comments