Skip to main content

Tracking Interactions

How to track user interactions with treatments

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

ParameterTypeDescription
projectIdstringYour project ID
userIdstringThe ID of the user who interacted with the treatment
treatmentTrackingIdstringThe tracking ID of the treatment that was interacted with
interactionTypestringThe type of interaction (e.g. VIEW, CLICK)
interactionTimestampstringThe 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"
}'