How to get Medium style report in Data Studio for WordPress posts using GTM & GA

I used to write on Medium and one of the things I liked about Medium is that they provide reports on how the users are interacting with your articles/posts. There is a really nice dashboard that they provide called “Stats” where it shows your Read / Engagement rates. You can view the dashboard here (if you have Medium account)

medium stats report
medium stats report

I wonder if it is possible to create something similar in Google Analytics using Google Tag Manager. Now that you can create triggers based on Timers and scroll rates, this should be doable. 

Medium doesn’t publish about how they count the “read” vs “view” so I am creating the read using my own definitions. 

For View, I will just define it as a page view in Google Analytics. It is when the users view the page by loading it in the browser.

For Read, I will define it as page view that contains at least 25% scroll on the page AND at least 1 minute on the page.

Part 1: Setting up GTM & GA

Now I just need to set up a trigger that has these conditions. Simo Ahava has written a fantastic guide here on how to set this up.

Below is my set up in screenshots. If you read through the guide, you can pretty much follow the logic I use below:

Datalayer Variable to capture timer interval
Timer trigger that fires at 60 seconds and scroll depth at least 25%
Scroll trigger which is similar to timer trigger above

In my opinion, you don’t really need both triggers. You can just use the timer trigger but scroll trigger is just in there for some cases where the timer trigger doesn’t fire first.

And below is a simple event tracking tag that uses both triggers.

Simple GA event tag using both triggers
Part 2: Getting the data from GA

Once the setup is complete and the container is published, you just have to wait for data to come into GA. 

You can find such data in GA Events report.

Sample GA Custom Report

Part 3: Visualizing the data using Google Data Studio

Now, this is the most exciting part. We will now create a Data Studio representing Medium Stats report.

Here is how you can create a dashboard like below.

Data Studio Dashboard
  • Views metric in this dashboard is just renamed metric for pageviews metric.
  • To get “Reads” metric, you can just pull Total Events metric and apply a filter to match the events that have the event tracking parameters for Read events. In my case, Event Category equals “engaged” and Event Action equals “read”.
  • To get the page table, you need to blend two data tables. If you are not familiar with blending in Data Studio, read more about it here. First, you get a simple table with page and pageviews metric. Then you create another table with page and events metric. In that second table, you can apply the same filter that you applied to get Read events. You can rename the metrics if you wish.
    • Then you blend these two tables together by using “Page” as a JOIN key. Then you should be able to get the table like the above example.
    • To get read ratio, you simply do a calculation on SUM(Reads) / SUM(Views) and mark as a percentage.

That’s all really! Hope you have fun creating this and comment below this post if you have any questions or have interesting use cases 🙂


Recent Posts

Recent Comments


zinko Written by:

Hi, I am Zin Ko Hlaing. I'm a big fan of Manchester United and I occasionally write here. Full-time Football Manager player, part-time trying to understand the Internet. Opinions expressed are solely my own and do not express the views or opinions of my employer.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.