
Tracking Interactions
Overview
Auxia provides a way to track user interactions with treatments. This is done by sending a request to the TrackInteraction
endpoint.
Request Format
The request should be sent to the following endpoint:
POST https://apis.auxia.io/v1/TrackInteraction
Headers
Content-Type: application/json
x-api-key: YOUR_API_KEY
Request Body
{
"projectId": "YOUR_PROJECT_ID",
"userId": "USER_ID",
"treatmentTrackingId": "TREATMENT_TRACKING_ID",
"interactionType": "VIEW",
"interactionTimestamp": "2023-01-01T00:00:00Z"
}
Parameters
Parameter | Type | Description |
---|---|---|
projectId | string | Your project ID |
userId | string | The ID of the user who interacted with the treatment |
treatmentTrackingId | string | The tracking ID of the treatment that was interacted with |
interactionType | string | The type of interaction (e.g. VIEW, CLICK) |
interactionTimestamp | string | The timestamp of the interaction in ISO 8601 format |
Response
The response will be a 200 OK if the interaction was tracked successfully.
Example
Here's an example of how to track a view interaction:
curl --location --request POST 'https://apis.auxia.io/v1/TrackInteraction' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"projectId": "YOUR_PROJECT_ID",
"userId": "USER_ID",
"treatmentTrackingId": "TREATMENT_TRACKING_ID",
"interactionType": "VIEW",
"interactionTimestamp": "2023-01-01T00:00:00Z"
}'