foreign
[Music]
series I'm Matt Landers and in this tutorial we're going to cover custom dimensions and metrics
so first let's define what a dimension and a metric are
so Dimension is a piece of data that describes an action that a user took now this is a string it's
something that's descriptive about what happened and a metric is also something
that describes what happened but it's a numerical value that can be aggregated
okay so let's have an example of what a dimension metric are so in Google analytics already there's
a purchase event and part of that event we can provide an item category like a shirt that would
be a dimension but we can also provide its price or the quantity that was purchased and that would
be a metric now a custom Dimension is a dimension that you come up with yourself it's not already
provided to you by analytics and it has something to do with you and your business and is specific
to what you're trying to accomplish now there's one thing to keep in mind with custom dimensions
and that's cardinality and that's just a fancy word that means the uniqueness of the data that
you're sending through so for instance in that example where we have the item category as a
shirt we wouldn't want to have tens of thousands of item categories because that's going to really
mess with your reports which is going to cause you to see an other Row in your reports and
it can be a little frustrating time to be able to see all of your data okay so now what we're
going to do in this demo is we're going to create a custom dimension on an event and parameter that
we created in the previous tutorial for custom events where we created a newsletter signup event
that had a custom parameter of a form ID that told us which form was used to sign up for our
newsletter was it the form in the footer or was it the actual newsletter sign up page that was used
then we'll be able to use that data in our reports to understand better how our users are signing up
for our newsletter and we can even tell which page was used on the footer to sign up but we can't do
that without creating a custom Dimension so let's go over to our analytics account and do that now
all right we're back on our website and what we want to try to figure out is which form our users
are using in order to sign up for our newsletter so let's take a look what that means if we scroll
down we'll see that we have a newsletter sign up here which is in the footer and we also have one
on our newsletter page so which form are users using are they going to the page to sign up are
they using the footer on any page and in order to figure that out we created a custom event in
a previous tutorial so if you want to know how to get the custom event into GA you need to check out
that tutorial we created a newsletter signup event that has a parameter of form ID of which form was
filled out and the form ID is just the HTML element ID of that form we created a different
ID for the page than we did the footer so now we need to be able to get that into GA which we are
sending already via the custom event and we want to have that process so that we can have a report
and know which one the users are using let's jump over to GA and see what it looks like all right if
we go to our engagement reports into events we'll see that the newsletter sign up is already here
okay but we don't have form ID anywhere we can't see which form was used we can see that there were
signups so this is good but we want a little more information so let's jump over to our Explorer
and we'll create a new exploration and we're going to replicate that report and show how we
would get that form ID in there so we'll go and we'll add a new dimension we'll add event name
and we'll add that to our rows and then we need to add a metric and we'll add event count for that
and we're going to double click event count and then that's going to add it as a value down here
and that'll basically replicate the previous report that we saw now we don't care about
all the other events we only care about the newsletter sign up so we can create a filter
on the event name and say that it exactly matches newsletter sign up which should pop
up if you've already sent events and there we go we have our newsletter sign up so we know
how many events there are but we don't know which form was used and there's no way for
us to figure this out until we create a custom dimension on the form ID parameter that we've
sent in with our custom event so let's go ahead and do that now all right to create the custom
Dimension we just need to go over to admin and then we'll go to our custom definitions
and then we have custom dimensions and custom metrics for this we're going to
create a custom Dimension so we create custom Dimension we're going to name it our form ID
it's event scoped you'll see that there are two different options here there's event and user and
probably by the time you see this video there will also be an item scoped we're going to do
event Scopes here but we'll cover user and item in future tutorials uh we'll call this the we'll give
a description of the form I d of the sign up form all right and then we need to choose a parameter
and it should already be here for us actually we can see it here our form ID and that's the
parameter that we sent in with our newsletter signup event now all we need to do is save this
and we have our new custom Dimension now keep in mind that whenever we create this Dimension
the data does need to be processed so it may take some time up to 24 to 48 hours before
that Dimension is available for you to use it in a report or an exploration okay we're back
in our exploration where I have been patiently waiting for 24 to 48 hours for our data to process
and now what we can do is we can add that form ID to our exploration so let's do it we'll go we'll
say We'll add a new dimension we go to custom and there's our form ID that we just created
or you know at some point we'll add that and then we'll add that as a column to our report now what
you're going to notice is that we have this not set value right here and what that means is that
GA has not received data for that Dimension but that's not exactly true here because the problem
is that we sent these events through prior to creating the custom Dimension so the only ones
that are available to us are the ones that happen after you create the custom Dimension this is very
important so don't go deploy your new event with your new parameters and have that run for a while
and think that you can create your dimension later you need to create it at the same time
so that your data is ready for processing so let's go ahead and change our dates so we see some data
here let's do the last seven days and now look what we have we can tell which form was used
in order for people to sign up we have four on the footer and one on the newsletter page itself
this is pretty cool we have some really valuable data here that can help us make
changes to our website but we can take this one step farther let's add another dimension
we'll add the page and Page title and screen name and then we'll add that to the rows
and since it's always newsletter sign up let's just take the event name out
and now what we can see is what page this actually happened on now the newsletter signup page is
always going to be on the newsletter form but we can tell in the footer that we have three
from the home page and one from the about page so this is valuable as well we can tell which pages
are performing the best and which ones people are getting to the footer and actually signing up for
so if this were a blog or something we could tell which blog was actually drive a newsletter signups
which is pretty valuable and then we can use this data in the future for other things as well which
we'll get into in future tutorials but hopefully this gave you a really good understanding of how
to use custom Dimensions to get more insights into what's happening on your site which can help
you lead you to make Better Business decisions alright so if you like this video please like it
and subscribe join our Discord server and know that all the code for all of these examples is
on our GitHub as well please leave a comment or reach out on Discord if you have any videos that
you want us to make and I look forward to seeing you in the next tutorial alright happy measuring
[Music]