Using Link Tracking Service in Messages

Message link tracking and Conversion

Messages that contain URLs can also contain a keyword (#track) that will trigger a URL replacement in the message. When an end user clicks the URL, the Syniverse SMS API service will notify the Customer that a "click-thru" and then a "conversion" event has taken place.

A conversion is a record of a response from a user to a message, not represented by a direct reply, but rather by recipient interaction (behavior.) For example, following a URL provided in an SMS message is a conversion event. Replying to a message can also be a conversion event. Each conversion event is associated with a recipient disposition (e.g. whether the response was positive or negative.) Conversion events can also be posted by the enterprise/application if these events originate outside of the Syniverse Communication API service’s awareness. (In that context, we provide an optional service that customer can subscribe to which can still track this and provide reporting and analytics based on them.)

How this works:

Our Communication Gateway offers Link Tracking capabilities for Message Requests with a URL shortening service. URLs within messages can be flagged for tracking. For tracked URLs, the service will replace the URL with a secured shortened URL (https:.//2.lnkme.net), that points to the link tracking service. When the end user navigates to the tracked URL, the link tracking service will update the message status to "CLICKTHRU" to show that the link was clicked. There will also be a Message State Change event generated and sent to any delivery configuration endpoints for this application.

In order to flag a URL to be tracked, the url is passed as an argument to a #track directive in the message body. 

Here is a sample message request with a tracked URL:

Request:

curl -X POST \

  https://api.syniverse.com/scg-external-api/api/v1/messaging/message_requests \

  -H 'Authorization: Bearer 3c5a336dfhu9d3f3e4d129a749b0f307' \

  -H 'Content-Type: application/json' \

  -d '{"from":"address:18775551212","to":["+14085551212"],"body":"Hello Kola, thanks for your patronage, please visit us at #track(\"https://www.syniverse.com/cool information for you\") for new information"}'

Here is the message received on the Handset:

"Hello Kola, thanks for your patronage, please visit us at https://2.lnkme.net/XYaP7o for new information"

Please note that when using the message console UI, be sure to remove the escape in the sample url above.

State Event for Messages:

Your application will receive several event state with a final one of “CLICKTHRU” assuming you have a webhook setup. The CLICKTHRU state will be part of several fields in the JSON posted to your application via your webhook and this state will only be received once the end-user clicks on the shortened link in the message

Sample JSON for a CLICKTHRU Event State:

{

  "topic": "SCG-Message",

  "attempt": 1,

  "event": {

    "fld-val-list": {

      "previous_state": "DELIVERED",

      "message_request_id": "9E0qhwPclVXnqMjbaYF4J5",

      "message_id": "uFAbXDeSXGMzgK5Qoxw5g2",

      "to_address": "+14085551212",

      "has_attachment": false,

      "reason_description": "SUCCESS",

      "application_id": 631,

      "reason_code": "200",

      "sender_id_alias": "Gladiator",

      "company-id": 92,

      "sender_id_id": "EjihJOXWJE24OhXleFXMG3",

      "external_message_request_id": "",

      "new_state": "CLICKTHRU",

      "fragments_count": 1,

      "from_address": "18775551212",

      "mt_price": 0.0095

    },

    "evt-tp": "message_state_change",

    "timestamp": "2018-08-10T18:42:27.059Z"

  },

  "event-id": "0nJNzMB5TjmdBQcTtiyW5w"

}
Was this article helpful?
0 out of 0 found this helpful

0 Comments

Article is closed for comments.