Step 1: Make a Get Treatments API call
Step 2: Get Ids for tracking
{
"responseId": "690e24d8-16a6-4518-bf37-09a8f0120dfb",
"userTreatments": [
{
"treatmentId": "6",
"treatmentTrackingId": "6_690e24d8-16a6-4518-bf37-09a8f0120dfb",
"rank": "1",
"treatmentContent": "{ title: 'You have a new message!', description: 'Learn how our product helps you', cta_name: 'Learn more', cta_link: '/tabs/home/feed'}",
"treatmentType": "IN_APP_CONTENT_CARD",
"surface": "HOME_PAGE",
"contentLanguageCode": "en",
},
{
"treatmentId": "4",
"treatmentTrackingId": "4_690e24d8-16a6-4518-bf37-09a8f0120dfb",
"rank": "2",
"treatmentContent": "{ title: 'Check out your trends', description: '87% of users found this feature useful', cta_name: 'View trends', cta_link: '/actionscreen'}",
"treatmentType": "IN_APP_CONTENT_CARD",
"surface": "HOME_PAGE",
"contentLanguageCode": "en",
}
]
}
curl --location --request POST 'https://apis.auxia.io/v1/LogTreatmentInteraction' \
--header 'Content-Type: application/json, x-api-key: ****************' \
--data-raw '{
"projectId": "1802",
"userId": "gGTE8CWUIgpzPivCejVk7JN284V",
"treatmentTrackingId": "6_690e24d8-16a6-4518-bf37-09a8f0120dfb",
"treatmentId": "1250",
"surface": "HOME_SCREEN"
"interactionType": "CLICKED",
"interactionTimeMicros": 1667829258250000,
"actionName": "Buy Now"
}'