Using Short Trackable Links Reporting

If you send messages with long URLs, you will love MessageMedia’s Short Trackable Links. By using this feature, you can automatically contract your web links into neat little URLs. There are many benefits, including reduced message characters and, in turn, cutting the cost of a message send. It’s also a great way to improve readability and increase customer engagement. Another added benefit of using Short Trackable Links is the availability of detailed analytics on those links, which can then be accessed through the API. In this developer guide, we will step through how to send a Short Trackable Link and obtain the click analytics for your links.

Sending a Short Trackable Link

Firstly, you will need to enable this feature by contacting your account manager or support at support@messagemedia.com.

Once you’ve enabled Short Trackable Links, it’s as simple as pasting a long URL into your message and sending as normal. The MessageMedia API will shorten your URL automatically, as part of the sending process.

We’ll use the messaging endpoint to send a message, and we’ll specify a campaign in the message metadata:

POST Body

{
  "messages": [
    {
      "content": "New designer lounges in store now, view the deals here: https://developers.messagemedia.com/code/short-url-api-documentation/",
      "destination_number": "+61491570006",
      "format": "SMS",
      "metadata": {
        "campaign": "christmassales"
      },
      "source_number": "jimsshop",
      "source_number_type": "ALPHANUMERIC"
    }
  ]
}

We have also used Alpha Tags to clearly associate the campaign with our brand and let customers know where the message originated from.

The customer will receive a message like this:


 

The shortened URL is much cleaner and takes up far less message space than a full URL. 

Generating a Short Trackable Links Report Summary

Download the following Postman collection to get started quickly using Short Trackable Links reporting:

https://www.getpostman.com/collections/1395e2bf741438b3fc92

Let’s query the summary reporting endpoint. The first way to do this uses the URL field. You can use the long URL or the shortened URL in that field to generate a report.

The second way you can use this endpoint is with the metadata Key-Value pairs. For this type of request the Key and Value are required. However, if you don’t use either, the URL becomes a required parameter. It’s important to note that you shouldn’t mix them and do both. Using the “campaign” and “christmassales” as Key and Value parameters, we get the same results as using the URL. Your results will come back looking like this:

Response Body

{
 "total_clicks": 1,
 "unique_clicks": 1,
 "total_views": 0,
 "unique_views": 0,
 "short_urls_generated": 1,
 "short_urls": [
   {
    "click_count": 1,
    "view_count": 0,
    "message_id": "b99986f0-b2c6-4091-ba37-d922a8c846d0",
    "long_url": "https://developers.messagemedia.com/code/short-url-api-documentation/",
    "short_url": "https://nxt.to/7J5Ld9k",
    "destination_number": "+614<NUMBER>"
   }
 ],
 "pagination": {
   "page": 1,
   "page_size": 100,
   "page_count": 1
 }
}

Generating a Detailed Trackable Links Report

For each short URL generated, the seven character code after ‘nxt.to/’ is referred to as the link’s “hashcode”. You can use this hashcode to generate detailed reports about an individual URL. Using the Postman collection again, we can move to the “detailed report” request, and place our hashcode in the variables section. A sample output will look like this:

Response Body

{
 "message_id": "b99986f0-b2c6-4091-ba37-d922a8c846d0",
 "long_url": "https://developers.messagemedia.com/code/short-url-api-documentation/",
 "short_url": "https://nxt.to/7J5Ld9k",
 "destination_number": "<NUMBER>,
 "click_count": 1,
 "view_count": 0,
 "clicks": [
  {
  "dt": "2019-06-07T01:54:17.255435",
  "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)   Version/12.1.1 Mobile/15E148 Safari/604.1",
  "ip": "<THE AGENT'S IP>"
  }
 ],
 "views": [],
 "pagination": {
  "page": 1,
  "page_size": 100,
  "page_count": 1
  }
}

Conclusion

Short Trackable Links is an easy way to improve the experience for customers when sending links. It’s simple to have the feature turned on for your account, and offers a range of benefits. With the summary report, you can quickly calculate the click-through rate (CTR) of your campaigns. Using the detailed report, you can measure specific engagement metrics at the recipient level.