Youtube Video Tracking Automatically in Google Drive

I learned a pretty neat Google Drive trick this morning…

How to import Youtube video views directly into a spreadsheet.

I work for an online school, I and take care of all of video blog and video SEO efforts.  From this experience, I have really learned the true value of video marketing.  That being said, I think it is vital to constantly measure your videos’ views (among other metrics available).

This blog is going to teach you an easy way to set up a Google Drive spreadsheet so that it can track your Youtube video views automatically.

One quick note:  For this method your videos will have to be in a playlist.  If you have some unlisted (or private) videos that you want to track, you may want to consider making an unlisted youtube playlist for this report.

Let’s begin.

1)      Get the url of your youtube playlist.  For the sake of our example I will use a small one that I have for nepasocialmedia      You can use any playlist url that you have, but please note that it can’t be https so use the http version.


2)      Now Create a new Google Drive Spreadsheet (Go to google drive click create in the upper left and choose spreadsheet.)

3)      In Cell A1, Paste your Playlist url.

Track youtube videos automatically


4)      In Cell B1 paste this:   =importxml(A1,"//span[@class='title video-title']")

 Track views from youtube


5)      In Cell C1 paste this:  =importxml(A1,"//span[@class='video-view-count']")

 views from youtube tracking   


There is your data!

From there you will just have to clean it up and total it as you would like.  Because the word “views” is in the views column I like to use this formula for each cell in my D column =VALUE(SUBSTITUTE({C1}," views",""))    I put that in cell D1 and drag it down.



There are plenty of other pieces of data you can pull in from your playlist too. Another example would be if you wanted to report on the length of your videos you would need to paste this =importxml(A1,"//span[@class='video-time']")   into a blank cell on your spreadsheet.   This is only one example and you can find many other video attributes to report on right from your playlist’s source code.  It tells you right what the class or div is called.

example for youtube tracking

Have fun with it!




Subscribe To Nepa Social Media on RSS Like us on Facebook Follow Me on Twitter Connect with Steve on LinkedIN Subscribe To Nepa Social Media on Youtube Add Steve on Google Plus Add Steve on Google Plus