How to configure Custom Dimensions in Google Analytics 4 (Custom Parameters in GA4)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we will learn how to track custom dimensions with google analytics 4 and google tag manager [Music] hey my name is julius and welcome to another's mania youtube channel where you can learn google tag manager and google analytics and if you want to stay up to date with google analytics 4 consider subscribing in the previous version of google analytics called universal analytics you could send some additional parameters to enrich your data and customize your reports that additional data was available in shape of custom dimensions and custom metrics in google analytics 4 you can also configure them however there are some differences for example scope so make sure you stick around till the end of this video in order to get the full picture so let's dive in first let's take a quick look at what dimension is in general then we'll learn or remember how custom dimensions and dimensions in general work in universal analytics which is the previous version of google analytics and then we will learn how to configure them in google analytics for so the first question is what is a dimension in general if you are new to web tracking a dimension is basically an attribute that describes an event a context a user or something else let's say a product in other words it is some sort of like a parameter or a property of an item that helps you better understand what kind of item is it or what kind of event or when did it happen and so on to help you better understand this here are some examples for example if you're tracking clicks of call to action buttons of your website and every button has an id you can send that id to your marketing or analytics tool let's say google analytics then transaction id is also a dimension another example is user's registration country user's pricing plan product category and so on as you can see these examples of dimensions apply to different items different things or events for example the first example applies to an event a second example which is transaction id can also apply to a purchase event then the third and the fourth examples apply to a user because they are user dimensions or user attributes or you can call them whatever you want and the fifth example applies to a product so to sum up a dimension is an attribute or a parameter or a property or called whatever you want of an item of an event of a user of a product or something else if we talk about google analytics other examples might be page path page url event category coupon code and so on even if analytics or marketing platform offers a huge list of possible dimensions they will not cover all the possible use cases that are needed for businesses for example in my case i am selling online courses and their level of difficulty is different that's why every time someone enrolls in the course together with that enrollment event i could send an additional dimension which is called let's say course difficulty level and the possible values can be beginner intermediate or advanced this dimension is too unique therefore platforms like google analytics don't have such a dimension built in that is why i need to use custom dimensions if you want to get the maximum out of your marketing or analysis platform you must customize it and one of the ways how you can customize it is of course send some custom parameters i mean of course if your platform supports customization but in google analytics for case that is absolutely possible before we jump into the actual configuration of custom dimensions in google analytics 4 first i want to talk about one more thing that users of universal analytics will definitely remember scope dimensions in google analytics can have different scope and if you have no idea what it is here's a very short definition scope determines to which particular hits will that custom dimension apply now i'm pretty sure that this sounds confusing but bear with me and i will show you some examples in the previous version of google analytics which is called universal analytics there were four scopes of dimensions first we had a user scope so what does it mean is that a dimension with a user scope will apply to all the hits of that user for example user id so if you wanted to send a user id or let's say some other user related parameter together with every event it was enough to send it only once and then all the subsequent events would get that very same dimension attached to that event or page view or whatever then another scope is session that one applies to all the hits of a single session so for example if you want to send a session id it is enough to send only once per session and then all of the hits in that session will get that custom dimension a third scope is hit now this one applies only to that particular hit with which the dimension was sent for example if we send a page view then page title is a head scoped event because when a visitor goes to another page the value of the page title changes other examples of hit scope dimensions can be button id or event category or forum id and so on and then the last scope in universal analytics is product so if for example you're tracking purchases and together with purchases you're sending the list of products that were purchased with every product you can send some additional product scoped custom dimensions for example product weight or product color or something else and if you are already an intermediate or advanced user of universal analytics you already know these four scopes but now let's take a look at how google analytics 4 handles scopes first of all user scoped custom dimensions are now known as user properties session scope is no longer available then hit scope remains as hit scope so if you are sending a parameter only with some event that parameter applies only to a particular event and then there are product scope dimensions so you can for example add some additional parameters together with each product that was let's say purchase or viewed i mean of course if you have implemented e-commerce tracking with legal analytics for however it looks like these custom dimensions i'm talking about product scoped custom dimensions are not yet displayed in google analytics for e-commerce reports hopefully that will change in the future so to sum up what you should now remember is that if you want to send a custom parameter with an event remember that the dimension that you are sending will always be a hit scope custom dimension of course you can register them as user properties i will mention that later in the video as well but if you want to apply a certain dimension for the entire session you will need to manually configure your google tag manager or ask your developer to do that to include that particular custom dimension with every hit for that session there is no way to apply session scope where you just send the value once and all the hits within that session will get that particular let's say session id or something else all right and now after we got a bit more familiar with the theory about dimensions let's take a look at one example here i have a website and on that website i have multiple forms so first of all i want to track successful form submissions but also i want to somehow distinguish which exact form was submitted well if you're thinking that it's possible to distinguish the form based on the page url on some websites that might work but in my case some forms are accessible on different urls therefore we need to find some other way how to distinguish which exact form was submitted so first of all let's take a look what we have in the data layer after we submit this form here i am in my google tag manager container i will enable the preview mode by clicking the preview button then i will enter the url of the website where i will be debugging click start and then you will see that your debugger is connected right here and also it is connected right here now if i successfully submit this form i would expect some information to appear in the data layer and in the preview mode of course and that is because this form is built on a plugin which is called contact form 7 it is a very popular wordpress form plugin and also i have configured contact form 7 tracking in my google tag manager container now if you want to learn more about it i will post the link below the video to another guide so let's submit the form here i will enter some gibberish information because this is just for demonstration purposes and click send the form is successfully submitted i see the success message right here and then i go to the preview mode and i see that there is an event called cf7 submission if i click it and if i go to the data layer i will see that there are some parameters added right here so these data points are available in the data layer but they are not sent anywhere yet we need to conditionally configure google tech manager to send some of this information to google analytics 4. for sake of simplicity of this tutorial what i will do that i will use this parameter which is form id so every time a form is submitted i will send the value of that particular form id parameter and therefore this will be my custom dimension of course we could go with other parameters but this is a bit more complicated and just to keep this tutorial as short as possible we will skip this part at least for now so first of all what i need to do is that if i want to access this parameter i need to create a data layer variable in my google tag manager container and that variable's name will be exactly form id so let's go to variables in google tag manager interface then in the user defined variable section click new variable configuration data layer variable and enter form id and here i will enter the name which can be basically anything you want but this is how i name my variables click save then i want to use this particular event this particular date layer event as a triggering condition in my google tag manager container so what i mean is that if this event appears right here i want to use this as a triggering condition therefore i need to create a custom event trigger in google tag manager so go to google tag manager triggers new trigger configuration then custom event and enter cf7 submission just like it is right here or right here and let's name the trigger save it and now the time has come to configure google analytics for tag in this video i presume that you already have at least very basic knowledge of google analytics for so this means that you already have at least one configuration tag in your container in this case my google analytics for configuration tag contains only one setting which is basically the measurement id of my property and this checkbox is enabled and the stack fires on all pages if you're wondering where to get that measurement id i took it from the admin then selected data stream right here clicked on a particular data stream and then got that id from here so this is a basic requirement that your container should already have of course the measurement id value will be different now let's create an event tag that will send the event about the successful form submission to google analytics 4. so in the text section click new tag configuration and then click ga4 event here we need to select the configuration tag of the property to which you want to send your data in our case that is ga config tag that i previously showed to you then in the event name field we have to enter well surprise surprise we have to enter the name of the event now what kind of name should it be well first of all i would recommend that you watch another video of mine which is about event tracking in that video i explained how to find the name of the event in google's documentation and if you cannot find it then you can create some custom event name below the video you will find a guide to my event tracking blog post and one of the sections there is about recommended events so google analytics 4 has a list of recommended events and it recommends you to use those particular event names for example if we go to generic list of events you will see some events right here like login refund search select content share and other events then in the sidebar you will also find retail jobs education travel and games and if you take a look at these you will find that none of these lists contain an event that is called i don't know form or form submission or something else related to forms therefore we have to create our own event name so in this example i will enter form submission and now the time has come for the custom dimension if you remember in the data layer we have a parameter called form id and we have already created a variable for it so now we need to add that dimension as a parameter right here you first of all should click the event parameters expanded and then click add row now it's time to add the event of the parameter in this case you can also enter any name you want in my case that can be form id this does not have to be the same as this so you can enter whatever you want and then in the value field we should enter the data layer variable that takes this particular value and inserts it right here so we should click on the variable button and then choose form id data layer variable now the final step is to select our trigger that we have recently created so click on the pencil and then choose custom cf7 submission now let's name the tag and click save the time has come for us to test so click preview button once again to refresh the preview mode then you will see that it loads again then our website refreshes and let's submit the form once again submit the form here's the success message now let's go to the preview mode and we see that our cf7 event is now in the data layer and once you click it you will see that your ga4 tag fired now let's go to google analytics and then on the left sidebar go to debug view here you should select your device if there are more than one and soon after you go here you will find your event right here in my case that is form submission but if you're tracking some other event obviously that other event name will be here so i can click on this event and i can see what kind of parameters were sent so for example speaking of my custom dimension here it is form id right here and this is the value that was in the data layer so now i am able to distinguish that this form submission event came precisely from this form and not some other format is on this website but our job is not done yet if you want to see data of this particular parameter in google analytics for interface you have to register that custom parameter as custom definition that's why you should go to all events then click manage custom definitions then click create custom definition and then you should enter the name of your custom dimension now this name must be exactly as it is right here i mean in your tag this one so copy this then paste it right here save it and your custom dimension is now registered in the google analytics 4 interface so what does it mean is that within 24 hours first of all your event will appear here and also when you click on that event inside of that event you will see some additional report about that particular custom dimension but remember it takes time for the data to appear in regular google analytics for reports it will not appear instantly but just to give you a glimpse of how that data will look in your reports here's another test property where i sent an event which is called menu click so this happens when every store clicks on any of the menu items on the website and together with that menu click event i also send the url of the menu item so i mean which url was clicked and also what was the name or in other words the text of the link of that menu item so i went to engagement then events i was then redirected to the list of all events and if i click on that particular menu click event at the bottom i will find two widgets about each dimension of course this is not the only place where you will find that data and if you want to learn more about where to find the event data in your ga4 reports i will post a link to that very same event tracking guide below this video now in the beginning of this video i also quickly mentioned user scope in google analytics 4 user scope dimensions are called user properties so if you have a certain parameter and you want to register it as a user property you should go to the user properties section in your google analytics 4 interface click it and then register that property by clicking new user property right here and then enter that property name right here so if you are for example sending the pricing plan of the user with every and every event and let's say that this is some data variable that returns pricing plan then you should register this pricing plan as a user property right here and then click create but i will not dive deeper into those in this video because user properties is probably a different topic for another video or tutorial and one last thing to mention in this video is the limitations because google analytics 4 has some limits when it comes to configuring custom dimensions so when it comes to custom text parameters so this is custom dimension you can create up to 50 dimensions per property and speaking of user properties you can create up to 25 properties per google analytics 4 property i know that this might sound quite confusing because we're talking about user properties but also about ga4 properties so basically you can create up to 25 user parameters per google analytics for property also there is another limit that you should keep in mind and that is the length of the parameter name you can create parameters that are no longer than 40 characters and that is how you track custom dimensions with google analytics 4. the process is different compared to the universal analytics you don't have to create custom dimensions up front feel free to just send custom parameters whenever you need but if you want to use them in ga4 reports then you will need to register those parameters as custom definitions in google analytics 4 interface and don't forget the limits of how many custom dimensions can you have in a single ga4 property if you found this video useful hit the thumbs up button below the video because it helps me continue working on this channel also if you want to learn more about google tag manager or google analytics 4 consider subscribing to this channel my name is julius this is analytics mania and i'll see you in the next video [Music] you
Info
Channel: Analytics Mania - Google Tag Manager & Analytics
Views: 14,411
Rating: 4.9436622 out of 5
Keywords: Custom dimensions, google analytics 4 custom dimensions, google analytics 4 custom parameters, ga4 custom parameters, ga4 custom dimensions, google analytics 4 custom definitions, ga4 gtm custom dimensions Google analytics 4 tutorial, gtm ga4, google analytics 4, ga4, event tracking in google analytics 4, how to track events in google analytics 4 web analytics, digital analytics, digital marketing, google tag manager, google analytics
Id: p2LTMQkf8X0
Channel Id: undefined
Length: 19min 25sec (1165 seconds)
Published: Tue Dec 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.