See what videos are being viewed on your site

2021-10-14 - Kristoffer Fredriksson

When GA4 turned what little I knew about Google Analytics on its head, I set out to recreate some of the views I relied on using Google Data Studio. (read all about it)

I quickly realized I could take it a few steps further, and I now have a bunch of tailor made reports being emailed to relevant parties within 24HR. It’s great. I don’t miss UA at all.

One thing I missed was my list of videos that had been viewed on-site, so recently I took one for the team and figured out how to do it. It was rather tricky, but I learned a lot about DAta Studio and GA4, and how to use them in tandem. Now the time has come for you to learn the same.

In this tutorial you will learn:

  1. How to create custom dimensions
  2. How to connect those dimensions to Google Data Studio
  3. How to make a report with information about them 
  4. How to filter data in tables

I won’t go into how to add your GA4 as a data source in Google Data Studio, so if you haven’t already done that I recommend you begin with that and then come back here.

Create a custom dimension in GA4

  1. In GA4, go to Configure > Custom definitions.
  2. Click on the button that says Create custom dimensions.
  3. Give it a memorable name, you can use space and underscore between the words, but not normal hyphens.
  4. I also strongly recommend giving it a moniker to indicate that this is a dimension you created. I use our company name, but you do you.
  5. Set scope to Event and give it a detailed description (you will thank yourself a few months in the future)
  6. Now for the Event parameter, this is where the magic happens, this is the value that GA4 is already measuring, but not giving you easy access to. Pick video_title
  7. Click Save

Connect it to your Data Studio

  1. In Google Data Studio, go to the home page by clicking the top left logo.
  2. Select Data sources.
  3. Click on the relevant Data source.
  4. Click on REFRESH FIELDS in the lower left hand corner. This will give you access to your newly created Custom dimension.

Well done! The only thing left is to add a table with the video titles in a Google Data Studio Report. Create a new report, or add a new page to an existing report, then follow the steps below. But let's begin by establishing some terms.

  • A I will refer to the central area as “the page”
  • B is what I’ll call the “top menu”
  • C is referred to as “the settings”

Lay the groundwork for the table

  1. Click on Add a chart in the top menu and pick Table
  2. Click on the table on the page and look at the settings
  3. Make sure the Data source is the one you added the Custom dimension to previously
  4. Under Dimensions, pick Event name and Add the Dimension you created and named previously

Nearly there.You can scroll in the list and see video titles among the events. Well, given that you have any video views on your site. This doesn’t seem to work retroactively so you bett go to your site and click on some videos. Then maybe you’ll have to wait for a while before it registers. Anyway, as soon as you see a couple of video titles in the table it’s time for the finishing touches.

Make it nice, actually

  1. In the settings, scroll all the way down until you see the Filter setting
  2. Click add new
  3. Name it “24HR most excellent Has Video Title Filter” and nothing else
  4. The actual filter should then be set up as follows: Exclude, Pick that well named Dimension you created, Equal to (=), (not set)
  5. Save

As long as you made absolutely sure to name the filter “24HR most excellent Has Video Filter” your table would now only display events that have a video title attached to them.

Now go wild and add other dimensions, like Page Title, or metrics like event count. You’ll find them in the settings. Have fun. Why not add your YouTube channel as a data source and compare which video gets the most views in the different channels?

You can do it!

If you liked this tutorial and would like to see more like it, just hit play on the embedded video below and play around with it for a while. (Using an embedded video as a like button is one of the many tools you now have at your disposal)