Introducing Smol Links: Shorten URLs Without Tracking

Imatge
Àmbits Temàtics

Our Word­Press plugin, built on top of Shlink, lets editors gene­rate short URLs without compro­mi­sing user privacy

About the Leve­lUp series: At The Markup, we’re commit­ted to doing everyt­hing we can to protect our readers from digi­tal harm. We’re cons­tantly working on impro­ving digi­tal secu­rity, respec­ting reader privacy, crea­ting ethi­cal and respon­si­ble user expe­ri­en­ces, and making sure our site and tools are acces­si­ble. We’re also commit­ted to writing about our process and sharing our work.

The Markup respects our readers’ privacy in everyt­hing we do—in­clu­ding the links we use to share our jour­na­lism.

We don’t use popu­lar URL shor­te­ners like Bitly, because the trac­king that comes along for the ride poses more privacy risks—­such as sharing our readers’ click traf­fic—t­han we are comfor­ta­ble with.

See our code here, and let us know if you find any bugs

Instead, we found an exis­ting privacy-minded URL shor­te­ner called Shlink, built a custom Word­Press plugin on top of it called Smol Links so our editors could easily gene­rate short URLs them­sel­ves, and then hosted it all on server infras­truc­ture we have full control over. Our short links count aggre­gate clicks only, so our audi­ence team can gauge trends in a way that fits within our privacy cons­traints.

From day one, our entire orga­ni­za­tion, and espe­ci­ally our product team, has had a clear and public mandate to avoid trac­king tech­no­lo­gies to the grea­test extent possi­ble—no third-party analy­tics, no sket­chy ad tech, no mone­ti­zing visi­tor data. This means we’re often doing extra due dili­gence on the servi­ces we rely on, and if we don’t find somet­hing that fits our privacy requi­re­ments, we build our own tools or custo­mize exis­ting systems and host it oursel­ves. Here’s why and how we appro­a­ched hosting our own URL shor­te­ner.

↩︎ link

The Trac­king That Comes with Exis­ting Short Links

A popu­lar appro­ach to sharing news links on Twit­ter—u­sed by The New York Times, BBC News, Yahoo! News, and many others—em­ploys multi­ple sequen­tial redi­rects from short URLs. By chai­ning redi­rects, news outlets capture audi­ence analy­tics in diffe­rent tools, each trac­king how many people clic­ked and who they are. Clic­king on a Yahoo! News yhoo.it link posted to Twit­ter will take you to anot­her short URL at yahoo.trib.al (hosted by analy­tics service Soci­al­Flow), ulti­ma­tely redi­rec­ting you to the story at news.yahoo.com.

Twit­ter itself has its own URL shor­te­ner, t.co, that auto­ma­ti­cally tracks clicks to each URL publis­hed on its plat­form. One such click on a news arti­cle can be obser­ved by Twit­ter, Bitly, Soci­al­Flow, the news outlet, and any third-party affi­li­a­tes those compa­nies have part­ne­red with.

What happens between your clic­king on a link and when the page loads?

 

Soci­al­Flow adver­ti­ses that it has trac­ked more than 12 billion consu­mer clicks from more than two billion devi­ces. Bitly simi­larly adver­ti­ses 10 billion clicks and scans monthly. The scale of accu­mu­la­ted traf­fic data is big, the exact amount of trac­king that compa­nies deploy isn’t trans­pa­rent to the public, and the data and short URLs gene­ra­ted are all stored with the analy­tics or URL shor­te­ner company an orga­ni­za­tion uses. These are some of the reasons why we adop­ted an open source URL shor­te­ner and built Smol Links so it can all be hosted on server infras­truc­ture we have full control over.

The trac­king from all those URL redi­rects also happens before the page loads. Once you’ve actu­ally loaded an arti­cle, websi­tes that are willing to host ads will pile on even more trac­king through ad trac­kers, third-party cookies, and canvas finger­prin­ting. If you’re ever curi­ous to know how websi­tes you visit are trac­king you, check out anot­her tool we made: Black­light.

Not all news outlets rely on short URLs this way, but when links are shared on Twit­ter, they get auto­ma­ti­cally shor­te­ned using Twit­ter’s own t.co service, which can’t be turned off. In most cases we post full arti­cle URLs to Twit­ter, and clicks on those links are still trac­ked by the t.co redi­rect. There’s nothing we can do about that if we want to tweet our work; all we can do instead is make sure we don’t layer inva­sive trac­king on top of that. Other news outlets like News­week and The Guar­dian also avoid using a short URL in their Twit­ter upda­tes.

The Markup does occa­si­o­nally rely on our own short URLs in our Twit­ter posts, to measure traf­fic or for aest­he­tic reasons. We count the number of aggre­gate clicks on each short URL but do not track indi­vi­dual people or IP addres­ses. That lets us unders­tand the vari­ous sour­ces of our website traf­fic without inva­ding anyo­ne’s privacy.

Finally, while the trac­king that happens in URL redi­rects is almost imper­cep­ti­ble, like other ad tech that loads on the arti­cle page, each redi­rect slows down the arti­cle load time. By elimi­na­ting these redi­rects, we reduce privacy risks while margi­nally spee­ding things up.

Buil­ding The Markup’s URL Shor­te­ner and “Smol Links, ” Our Word­Press Plugin

We’re not inter­es­ted in buil­ding things that alre­ady exist, so before writing our own link shor­te­ner, we tried to find out whet­her a privacy-minded tool alre­ady exis­ted. So when we found Shlink, an open source URL shor­te­ner writ­ten by soft­ware deve­lo­per Alejan­dro Celaya, we deci­ded to use it. Shlink has func­ti­o­na­lity simi­lar to Bitly’s but is desig­ned to run on one’s own server. Our self-hosted Shlink server takes care of most of the heavy lifting—­ke­e­ping track of our short URLs and redi­rec­ting them to the longer origi­nal arti­cle URLs.

For exam­ple, when you click on mrkup.org/amazon-brands, our Shlink server is what sends you to https://themar­kup.org/amazons-advan­tage/2021/10/14/amazon-puts-its-own-brands-first-above-better-rated-products.

Shlink also inclu­des a feature that avoids trac­king our visi­tors by IP address. When we were testing out the soft­ware, we disco­ve­red a bug that meant IP addres­ses were being trac­ked anyway and logged a request with Celaya to fix it. We appre­ci­a­ted how seri­ously Celaya took the request, and he fixed the bug in a day. 

The soft­ware part that we’ve built on top of Shlink’s URL shor­te­ner is a Word­Press plugin we’re rele­a­sing called Smol Links. The plugin lets our editors create and manage short URLs from our exis­ting Word­Press CMS, a user inter­face they are alre­ady fami­liar with.

 

 

 

 

 

Screenshot of Smol Links manager within a WordPress editor, with options to shorten a link or browse existing short links.

 

Caption: Here’s what our Word­Press plugin, Smol Links, looks like. You can use it to manage or create Shlink short URLs from within Word­Press. Credit:The Markup

 

 

 

The plugin has an option to auto­ma­ti­cally gene­rate new short URLs anytime a story gets publis­hed, which was an essen­tial feature for sending out SMS announ­ce­ments. The plugin uses Word­Press filter hooks to offer more custo­mi­za­tion possi­bi­li­ti­es—­for exam­ple, to append query string argu­ments to each long URL.

 

 

 

Because mrkup.org is hosted on server infras­truc­ture we have full control over, running code we can observe and modify, it means we have more confi­dence about what happens to our readers’ click data. It means we are not limi­ted to choo­sing between the ad-tech panop­ti­con and no traf­fic insights what­so­e­ver. Smol Links lets us measure where our visi­tors come from in gene­ral without under­mi­ning the trust in our privacy promise that we’ve worked hard to earn.

 

 

 

↩︎ link

Everyt­hing Star­ted with SMS

 

 

 

Last year, our audi­ence team wanted to expe­ri­ment with sending out SMS noti­fi­ca­ti­ons, announ­cing via text message whene­ver we’d publish an arti­cle. We ran this expe­ri­ment for five months and origi­nally set up our own parti­ally disem­vo­we­led domain, mrkup.org, in order to fit arti­cle upda­tes within the 160-charac­ter limit of a text message.

 

 

 

 

 

 

 

 

 

Screenshot of SMS announcements for stories, each including short links going to mrkup.org.

 

Caption: Links in SMS upda­tes need to be shor­te­ned to fit inside the 160 charac­ter limit. Credit:The Markup

 

 

 

Anot­her essen­tial feature for sending out SMS announ­ce­ments was the ability to gene­rate new short URLs anytime a story gets publis­hed. That’s what drove us to find Shlink and then build Smol Links on top of it.

 

 

 

After looking at aggre­gate traf­fic numbers, we saw that SMS was not a popu­lar way for our readers to get arti­cle upda­tes, so we deci­ded to end that expe­ri­ment. But we conti­nued to use the URL shor­te­ner on other social media plat­forms like Insta­gram, where hyper­text links are not nati­vely suppor­ted except as a stic­ker in Stories.

 

 

 

↩︎ link

Doing Our Work in Public

 

 

 

Join us in buil­ding a better World Wide Web, star­ting with the modest short URL redi­rect. You can down­load Smol Links in the Word­Press Plugin Direc­tory or down­load it from GitHub. We look forward to reading your issues and pull requests.

 

 

 

We intend to do more of that work in public, sharing what we know about main­tai­ning privacy-respec­ting systems and rele­a­sing some of the soft­ware we’ve writ­ten. We hope this effort might encou­rage others to make a simi­lar invest­ment on behalf of their own website visi­tors and help us gather feed­back about where we might have room for impro­ve­ment.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

How did we do that? It was thanks to you.

 

 

 

Reader support is an essen­tial piece of The Markup equa­tion. Your gift lets us report the stories that help to build a better future. Give today.

 

 

 

Donate Now

 

 

 

You can down­load Smol Links from the Word­Press Plugin Direc­tory Gabriel Hongs­du­sit