Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Get a new Google Analytics tip every other week from online marketing expert Corey Koberg. Most users unlock just a fraction of the power that Google Analytics offers, so in this course Corey exposes tips and tricks to unlock insights into one of the most sophisticated tools in the marketer or site owner's arsenal. He offers peeks into the latest power features, advice for deeply mining your digital data, and actions you can take to optimize your site for both traffic and conversions. Corey answers common questions about online marketing and web analytics, including installation, tag management, reporting, custom variables/dimensions, attribution modeling, segmentation, multichannel funnels, data accuracy, visualizations, Universal Analytics, and more. What's more, Corey welcomes your questions and will shape future videos based on member requests, so send them to us at firstname.lastname@example.org.
In the last two videos, we showed how to do Dimension Widening to add more data and we looked at a way to do by keying off query student parameters in the URL. Today we're going to look at a question that came in from over Twitter. For a case where we have embedded YouTube videos on a page similar to this very simplistic example webpage that I've got here. We're going to add more data to our Google Analytics data, by keying off of some of the metadata in the form of a custom dimension. Now you can see here that I've several test pages where I've embedded various videos on their own page, as if they were pages on my site where I embedded YouTube videos for visitors to view.
So in this scenario, I want to do some analysis about those video pages. Now my site is not a video sharing site. I just happen to have some videos in various places. So I've got a table here where you can see the set of videos that I've got, and some additional info and context about them. Some have different authors. Some are about different topics, or categories, and so on. I want to understand if say, one topic is outperforming another. Now, to get this data there are a few different plugins and scripts out there that will automatically query the YouTube player and extract all kinds of information, such as stop, start, play, fast forward, video completed, and some more basic info about the video itself.
These scripts all are going to hit the YouTube Analytics API. You can find a little bit more about that on this page. Now almost all of these scripts are going to pull back the video ID, which is the unique identifier in the YouTube database for that video. For example, if we come here to this YouTube page, we can see the video ID up here in the query stream parameter is right here after the v. Now, that ID is going to be very useful for the YouTube servers to keep track of the videos. But as an analyst that string means almost nothing to me. I want to capture this other information here. I've got the video ID in this column, but the other information here is what's actually useful to me as an analyst.
So what I can do is I can key off of that unique ID and upload this spreadsheet. That way, whenever anyone views the video, which is going to be stored in Google Analytics with that video ID. It's going to increment the stats around the rest of this information. The titles, the categories, the authors. Okay, we said that I've got this script running and those videos are already populating that video ID custom dimension. So let's go ahead and verify that that's actually the case. One thing I can do here, I can come and I can create a custom report. And let's call this Video ID. We take a look here, if I go up to Edit, we'll see that it's a very simple one.
Here, I'm simply going to look at the total number of events, which is how this data is being sent in. And I'm going to do it in my primary dimension here is Video ID. So if I come to this custom report. I see here that I got my video ID as the primary dimension and I do see some events coming in. So there are some views of those pages and those video IDs are being captured and sent to Google analytics. Problem is, this is pretty much worthless as far as analysis goes. This tells me almost nothing about how this content's being consumed or even what it really is. Okay. We're going to fix that. The next thing I need to do is create the custom dimensions that are going to receive my title, category and authors.
We come back here to the admin, come down here to my custom definitions. Custom dimensions. And we see I've got these here. I've got video Author, Video ID. As well as Title. Now, I won't go through how to create these custom dimensions for the sake of time. I've got the other videos that will show how to do that if you need a quick refresher. The next thing we need to do is actually create the data import. So, I come on down here to Data Import. I've got here my Video Data and what we see here is that I'm going to import this data and it's going to key again off of this video ID which I've got here in custom dimension number ten.
The imported data's going to be the title, the category, and the video author. And those are in seven, eight, and nine. We of course want to remember these. We're going to go ahead and get the schema. This is going to download the Excel file for us. I'm actually also going to copy this in here, this ten, seven, eight, and nine. And I'll show you why later, but for now I want to get those commas and everything. Download the schema template and it's going to give us the Excel file that we're going to populate. Okay. So here's what we've got. We've got our, our header's already set here. Again this is dimension ten, seven, eight and nine. What I want to do is take the exact data that I had over here in my Excel form.
I'm just going to copy that in and paste it right in. Course my headers are going to change to the custom dimensions but otherwise. It's going to stay exactly the same. Okay, I've saved this data here. And what I want to do now is upload that. We click down here, come back here, click Done. And we need to do is come up to our video data and click on Manage Uploads. Here we want to go select our file. Choose files. Select one that we just saved. Go ahead and upload that. We see it's been uploaded here. Refresh this until it says Completed and we're all set. Now remember, to test this, you actually have to fire off these pages, so if you're on your own site, and you're getting lots of traffic, that's no problem, but if you're on a test site like I am, you're going to have to actually go and fire those pages yourself, so come back up to those tabs.
Refresh through each one of those and so on. And make sure this data actually gets sent back to Google. Another quick tip. Make sure that you're not filtering out your own traffic. I know many of you have set up filters so that your internal traffic gets excluded. So if your excluding yourself and filtering yourself out here. You're not going to be able to test this here. So make sure you're not filtering your own traffic out if you're trying to test this. Now, because this takes a while, I've already done the import. So let's go ahead and see what that looks like. One thing we can do is just come right back to that same custom report we had before. Remember we had the video ID in here and said it was pretty useless. So now that we've got those other dimensions in here.
We've got that other data. We can pull that in. I can come down here for a secondary dimension. Click on this. Now remember I had the category. I had the video author. And I had the title. So let's go ahead and pull in title. Just to see which of those videos it is. Okay we see that the video ID is here. Then I've got some much more useful titles that are here. I could also go ahead and look at category, would be a useful one. If I wanted to see how the categories were doing. I can sort by total events. And see in order which ones are the most popular, we see the categorises in here and how they respond to the various video IDs.
Now one thing I can do if I wanted to see instead of fun being spread out by the video ID, maybe I want to see in general which categories are getting the most traffic. I can come up here and edit this. Instead of having VideoID as my primary metric I can just change this to be one of those ones I just added. For example, we could add Category. And here I can see them all summed together. So all the fun videos, all the CPT ones, all the premium ones are going to be summed up to see which category is doing the best. And then of course if I want to break that out, I could have my secondary dimensions on top of those. So I could go ahead and add something like, Author.
Actually that's not the right one. I want to make sure I get Video Author. Gotta make sure I keep our custom divisions straight. Video Author. Okay, and then we're going to see which of those are broken out, in which case. So, here we've got the fun ones done by Lynda and then each of those if they do repeat, as they do down here, if we have several different authors, we'll see those as we normally would in secondary dimensions. Now one issue I've got here is that I can only see the secondary dimension. I've basically only got two dimensions that I can play with, unless I get into pivot tables and other things. But what if I wanted to see what we had in that original Excel sheet, where I had the Video ID, the Description, the Title, the Category, the Speaker, etc.
? What if I want to see all four of these across just like this? Well I can do that, one of the ways I want to do it is we can head back to query explorer. Remember when we talked about the API query explorer. So if I put in API query explorer, come right back to that tool. And one thing that I can do is take those exact dimensions that I have and just push them across. Now remember I said I was going to copy those in? What I'm going to do is just go ahead and paste those right in. Now if you don't remember that, one other trick you can do is go back to your template.
Remember that the template has those across the top, ten, seven, eight, nine things there. But the nice thing here is I've already even got my commas right in there. It's an exact format that I needed when I copied it there. So I've got that ten, seven, eight, nine here. I can go ahead and select my metrics, in those cases, I wanted to grab total events. Set my date range. Click Get Data. What I see here is exactly what I had in that sheet. I've got the video ID, I've got the title, I've got the category, I've got the author. And of course how many events for each one of those, so the performance of all that. Okay, so now you've seen how we can extend custom dimensions in a real world example where we've appended information in context about our YouTube videos, where only a ID was populated in a custom dimension.
Now, again, if you have any more use cases you'd like to see, let me know.
Find answers to the most frequently asked questions about Google Analytics Tips.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.