Why you should start using short URLs in your posts
Tags: python, analytics, data
Published: 2020-12-26 17:32:10

---
title: Why you should start using short URLs in your posts
date: 2020-12-26 17:18:42 UTC
tags: Python, Analytics, Data
canonical_url: https://www.joachimzeelmaekers.be/why-you-should-start-using-short-urls/
published: true
---

 ![Why you should start using short URLs in your posts](https://www.joachimzeelmaekers.be/content/images/2020/12/luke-chesser-JKUTrJ4vK00-unsplash--1-.jpg)

When you're looking at social media posts, people are sharing many URL's, blog posts, etc... But I feel that people forget to analyse these clicks. When you're using the non-premium LinkedIn you get insights into how many people have seen your posts, but no indication of any clicks. When you're using Twitter, for example, you get a much more in-depth analysis of the number of clicks, likes, interactions,...

You might be thinking: "We have Google Analytics on our webpages for that". And that's fine, but what if you have no insights in those analytics? Let's say you want to get to know your audience by posting content on different topics. You might receive many likes from friends or colleagues, but you don't know if anyone is actually opening the content. That's where short URLs come in!

I'm sure that everyone knows what a short URL is, but here is a short explanation. You take a long URL, like _www.this-is-a-very-long-URL-and-not-so-interesting-to-post-on-social-media-especially-when-your-tweet-can-only-be-280-characters.com._ This long URL gets converted into an URL that looks like [https://cutt.ly/](https://cutt.ly/VhNGl3M)XXXXXX, much shorter right? That's the only thing it does. Or so you might think.

When you're using platforms like [Cutt.ly](https://cutt.ly/), you get much more than a better-looking URL. You get a dashboard for all the data that your links collect.

In the graph below, you can specifically see in what timeframe people are clicking your links, from which devices they are engaging with your content and what their language is. You even get their estimated location.

![Why you should start using short URLs in your posts](https://www.joachimzeelmaekers.be/content/images/2020/12/Screenshot-2020-12-25-at-21.52.41.png)<figcaption>Screenshot by Author</figcaption>

![Why you should start using short URLs in your posts](https://www.joachimzeelmaekers.be/content/images/2020/12/Screenshot-2020-12-25-at-21.55.36.png)<figcaption>Screenshot by Author</figcaption>

### Now, why is this so important?

In this world, where every application and every social media post fights for the audience's attention, you have to be able to send your audience the content they want. This is not that important when you're writing as a hobby, or not trying to build an audience. But when you are looking to engage with an audience and grow it, you have to give them what they want.

In my example, I can see that most of the people that clicked the link speak English. That confirms the language that I write my content in English. It's important to you know what your audience likes. This is true in business, marketing, product development, and writing. It's probably true for every kind of product. You might have the craziest idea, that solves all your problems, but if no one has the problems you solved with your idea, no one will use your solution. And certainly not pay for it.

Of course, it's important to analyse this kind of data, but knowing who opened the link is not enough. You have to combine all your analytics, but this is the first step to some amazing insights without much effort.

* * *

### Integrating this data into your platform

When you completed the first step, you might want to integrate this data into your tools. And that's perfectly possible. Cutt.ly exposes an API to extract all the data from your links. The documentation is not up to date, so here you can find a snippet that collects data for a certain link using Python.

<!--kg-card-begin: markdown-->
```
import requests
import json

API_KEY = 'YOUR-API-KEY'
SHORT_URL = 'YOUR_SHORT_URL'

payload = {'key': API_KEY, 'stats': SHORT_URL}
response = requests.get('https://cutt.ly/api/api.php', payload)
json_data = json.loads(response.text)

print(json_data.get('stats'))
```
<!--kg-card-end: markdown-->

Once you have this data, you can create custom graphs and analyze it an easy way.

* * *

### Conclusion

I think data is fundamental to this world, certainly when you're working with people. Everyone can say that they like your content, but they might as well say it to make you feel better. By analysing the behaviour, you know if people actually read your content.

Collecting this data also opens up a way for you to test new content, see if people engage with it, and compare it to your other content. Using this approach, you make sure that your audience loves what you do and you can rest assured that your content is appreciated.

But if you don't measure it, how can you prove that it's working?