Medium Next Generation Stats cover

Medium Next Generation Stats

Hacking medium articles statistics page and giving it to the people

02/Feb/2020
4 minutos

Let me tell you, I feel like I am the Robin Hood of the twentieth first century. Except for not stealing anything from anyone and not being an outlaw whatsoever. Oh, and no hood, for god sakes.

You know what? Forget about this whole Robin Hood thing. I don’t know why it came to my head. Let’s focus on what matters: Medium Next Generation Stats.

After months of loneliness, disappointment and frustration due to the lack of information of medium’s statistics page, I decided to do it by myself.

Suck it, medium folks who like ignoring emails.

A bit of context so you can feel the pain I used to feel. Medium Stats is a webpage where you can view statistics of the articles you publish on the platform. It’s also a tool that severely lacks a lot of stuff.

This is the default medium’s statistics page:

It shows my articles got 20 views in January 31st. I know, it’s embarrassing. Specially considering this is one of my best days. Anyway, I got 20 views that day. So what? Which article got these views? No idea… Which article was the most read on throughout this range? No idea either. What if I want more than just 30 days? By now, I believe you got the picture.

I know, medium stats are made for writers not data lovers freaks. But does it have to be so incomplete? It almost feels like they are pushing themselves really hard to hide information from the users.

I was not the only one with this kind of problem. Actually, there’s a huge list of disappointment around the globe. Check some of them out: Deconstructing Metrics on Medium, Data Science with Medium Story Stats in Python, Medium Hates Him! See How He Improved the Stats Page With This One Simple Trick. To quote one of them:

Medium tracks plenty of information that isn’t available within the limited functionality of the page. Furthermore, any functionality that does exist is centered around vanity metrics that struggle to convey the full picture.

Medium does provide an API and a SDK so you can consume this information yourself. “Nice, I can do it”, I thought. So naive! In order to get that, you must request access by supposedly emailing medium support.

God knows how hard I tried.

I think it’s perfectly acceptable to say I begged for medium’s attention. In vain.

Googling a little bit, I found some interesting solutions. From scripts that navigate through medium’s webpages to browser extensions.

This solution really got me fascinated. It consists of a chrome extension that performs HTTPS requests to medium public API. Other than that, it modifies a bit the original medium page with some enhanced information. I didn’t even know chrome extensions were that powerful.

But none of the solutions fulfilled me. Even though they were great, there was always something missing.

But wait a minute! If a chrome extension is able to modify the original page… Why not adding a real plethora of meaning information? Different kind of data and charts…

Great. Let’s create one and share it so everyone can easily get insights from their data. There’s only one tiny little problem: no idea how to create it at all.

Drumrolls…

To make a long story short, I didn’t have to learn it all from the scratch. Thanks to the open source community itself, it was not necessary to reinvent the wheel. Yay.

Now I know which articles were read in January 31st. o/

Now, medium stats page is improved and you’re able to get meaningful information. More data, more charts, larger ranges… Everything you need. You’re welcome.

Once you get the hang of it it’s really hard to stop. It’s surprisingly simple and addicting. You want to add new features until the end of times. Sometimes it gets hard to conciliate a social habits with your wiliness to keep adding stuff. I know some people that would be glad to confirm this statement.

The result, you can see in the chrome webstore, firefox store and in its repository. Feel free to request any feature you think it’s missing.

Its full codebase is available here:

virgs/medium-next-gen-stats

As you are maybe aware of, I am not a really well succeeded author (let’s put this way). So, I have no idea how this system is going to behave under really high demand, when the amount of collected data is greater than few thousands… I hope a “medium best-seller” author starts using it. Or, even better, who knows I may become one!

I tell you once I get there.

If you like it, please consider evaluating the extension. Clapping this article is a nice thing to do as well. 😅

Já que você tá por aqui, dá uma olhada nesses aqui também: