Auxia
  • Welcome!
  • Quick Start
    • Getting Started
      • Step 1: Ingesting your data
      • Step 2: Integrating Auxia into your product
      • Step 3: Defining your model objective
      • Step 4: Creating your first treatment
      • Step 5: Measuring success
        • Interactions
        • Engagement
  • Data Ingestion
    • Overview
      • User event data
      • User attributes
    • Data Connections
      • Google BigQuery
      • Amazon S3
      • Amplitude
        • Batch with Export API
        • Streaming with Google Pub/Sub
  • Deploying Auxia
    • Deploying with Auxia's API
      • Making your first call
      • Tracking interactions
      • Surfaces and types
      • Contextual attributes for real-time distribution
    • Delivery Integrations
      • Braze
  • API Reference
    • Get Treatments
    • Log Treatment Interactions
  • Treatment Management
Powered by GitBook
On this page
  • Step 1: Make a Get Treatments API call
  • Step 2: Get Ids for tracking
  • Step 3: Fire Request
  1. Deploying Auxia
  2. Deploying with Auxia's API

Tracking interactions

PreviousMaking your first callNextSurfaces and types

Last updated 7 months ago

Step 1: Make a Get Treatments API call

Review "" if you haven't already done so.

Step 2: Get Ids for tracking

From the response, copy the following:

  1. treatmentId

  2. treatmentTrackingId

Sample response:

{
   "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",
       }
   ]
}

Step 3: Fire Request

Go to the console, click on the API Integration tab, and click "Show API Key" to get the API Key.

Fire the request from terminal or your client:

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"
}'
Making your first call
Page cover image