Getting more fine-grained medium.com readership stats

Matthew McKeever
3 min readApr 30, 2022

One of the advantages of medium for the casual or not-so-casual blogger is cleanness and simplicity. This is reflected in part in the stats page, which lets you see your daily views across all articles, monthly views across all articles, as well as more granular stats for each article, all without doing anything. However, these stats only go so far, and one thing one can’t see at a glance is which articles were viewed today (you can see it not a glance by clicking through to each article’s main stats page but that takes too long).

I made an extremely janky, rube-goldberg webpage to get better stats. It’s not super helpful, for this very big reason: in order to find out which articles were read between t1 and t1+n you need to enter the stats to the site at both t1 and t1+n, and although that only takes a few seconds, it nevertheless isn’t automatic. You can’t, at present, automatically get a list of which articles were read today with this site. If anyone can think of a maximally non-obtrusive, no-code solution for this, let me know!

Note: This Isn’t Tested At All — While It Won’t Blow Up Your Computer It Might Just Not Work For Boring Reasons. If It Doesn’t Work For You, Tell Me! I disclaim all liability in perpuity ad eternum etc. But it does work for me, it seems.

With that apologia out of the way, here’s what you do. Go to https://narrowmediumstats.glitch.me/. Go now, right now! In a separate window, open medium.com/[you]/stats. Scroll down all the way to the bottom so all your stories load. Put your mouse below ‘Stories’ and above ‘Date’, where the screen isn’t clickable (see screenshot 1, with the three little dots). Right-click, inspect, then right click the highlighted div (see screenshot 2), right-click, copy element.

Step 1. Put your mouse where the little liney dots are

Go to the glitch site. Paste the clipboard into the text box. Parse. If you reload the page, the site should now tell you when you last saved data on the webpage (i.e., a few seconds ago). Your stats have been saved as an array with key ‘id’ in localStorage. I have no idea of exactly how localStorage works, so if something goes wrong that might be the culprit.

Step 2. Right-click the highlighted div and copy it.

Go away, do something else, for quite a few hours, maybe a day. Return. Get the stats from your medium page exactly as described above, then click ‘Click to compare old and new’. All being well, you’ll see something like in screen 3 — a table will have appeared with recent views.

Step 3. Profit (from the more granular info about which articles have been viewed since you last entered info to the site.

The code, being on Glitch, can be viewed by anyone by going here. It’s super badly written code, but you can look at it to convince yourself it’s not doing anything insidious.

--

--

Matthew McKeever
Matthew McKeever

Written by Matthew McKeever

Novella "Coming From Nothing" at @zer0books (bitly.com/cfnextract). Academic philosophy at: http://mipmckeever.weebly.com/

No responses yet