Message tracking solution

Automatically track conversion rates for your campaigns.

When you’re doing an SMS or Voice campaign, it can be very useful to track its performance and to measure your user conversion rates. For example, if you are sending One-Time PINs, it is really important to track conversion rates to be able to optimize your flow and processes.

The OTP tracking solution will automatically track every message sent over the Infobip platform. Just set the track parameter to SMS or Voice and, optionally, put the type parameter of your campaign and tracking will be done automatically.

These features are set in the tracking objects in the Fully-featured textual message API for SMS or Fully-featured Voice message API for Voice method:

SMS tracking example:

POST /sms/1/text/advanced HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json

{
   "messages":[
      {
         "from":"InfoSMS",
         "destinations":[
            {
               "to":"41793026731"
            }
         ],
         "text":"Your PIN is 1a2B3c."
      }
    ],
   "tracking":{
         "track":"SMS",
     		 "type":"One_Time_Pin"
    }
}	
  

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "bulkId": "1446634544520356423",
  "messages": [
    {
      "to": "41793026731",
      "status": {
        "groupId": 1,
        "groupName": "PENDING",
        "id": 7,
        "name": "PENDING_ENROUTE",
        "description": "Message sent to next instance"
      },
      "smsCount": 1,
      "messageId": "8ef699bc-d4c6-4cf6-8d6e-9a9aa62ad93a"
    }
  ]
}	
  

As a response you should receive a 200 OK status with message details in the response body.

Voice tracking example:

POST /tts/3/advanced HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json
Accept: application/json

{
   "messages": [
      {
         "from": "41793026700",
         "destinations": [
            {
               "to": "41793026731"
            }
         ],
         "text": "Test Voice message.",
      }
   ],
   "tracking":{
         "track": "VOICE",
         "type": "MY_CAMPAIGN"
   }
}	
  

Response:

{
  "bulkId": "BULK-ID-123-xyz",
  "messages": [
    {
      "to": "41793026731",
      "status": {
        "groupId": 1,
        "groupName": "PENDING",
        "id": 26,
        "name": "PENDING_ACCEPTED",
        "description": "Message accepted, pending for delivery."
      },
      "messageId": "MESSAGE-ID-123-xyz"
    }
  ]
}	
  

As a response you should receive a 200 OK status with message details in the response body.

Conversion rate submisison

When a user successfully performs the action after receiving an SMS or Voice message, enters a One-Time PIN in your app for example, you can send that info to us so we can measure conversion rates.

For conversion rate submission, you only need to provide the messageId received after sending the SMS or Voice message. The messageId has to be submitted to our endpoint as the conversion happens.

Endpoint for submitting the conversion rates: https://api.infobip.com/ct/1/log/end/{messageId}.

Example:

POST /ct/1/log/end/8ef699bc-d4c6-4cf6-8d6e-9a9aa62ad93a HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json	
  

As a response, you will receive a processKey that is used for getting conversion rates and statistics:

{
 		"processKey": "A37D448C1ACCA02FABA745522558326C" 
}