Up to date: March thirtieth, 2022
The factor with Google Analytics (or every other related instrument) is that it received’t make it easier to a lot in the event you use it simply “out of the field”. I’m speaking in regards to the basic “simply add one line of JavaScript to your web site and begin monitoring”. If you wish to profit from a platform, it’s important to customise your information assortment.
Each enterprise is exclusive and also you would possibly need to monitor various things with the intention to perceive how totally different elements are performing.
And one of many methods how one can customise it’s {custom} dimensions. As a substitute of simply having some generic information, you possibly can go actually deep together with your setup. Though Google Analytics 4 gives higher automated monitoring capabilities (in comparison with Common Analytics), that’s not sufficient.
On this weblog put up, I’ll present you how you can configure Customized Dimensions in Google Analytics 4 (with Google Tag Supervisor).
Desk of contents
+ Present desk of contents +
Video
In case you desire video content material, right here’s a tutorial on my Youtube channel (subscribe to remain up-to-date with GA4). However to get essentially the most out of it, I like to recommend doing each: studying this text and watching the video.
learn this information?
I’ve cut up this weblog put up into two main elements:
- An introduction to {custom} dimensions, some fundamentals about Common Analytics scope, and the way that modified in Google Analytics 4
- An instance of how you can configure {custom} dimension in Google Analytics 4 with Google Tag Supervisor
If you wish to skip simply to the sensible half, be happy to take action. However in the event you discover one thing complicated, then learn the primary half as effectively.
PART I: Let’s begin with some concept about dimensions
On this half, I’ll briefly clarify what are dimensions and their scope in earlier and present variations of Google Analytics
1.1. What’s a dimension?
Let’s begin with the fundamentals (as a result of some readers of this weblog put up is likely to be new to the sport). What’s a dimension?
Merely put, it’s a parameter/attribute or attribute of information. It is likely to be an attribute of a product, occasion, consumer, web site, and so on. It helps us higher describe and perceive what is going on, the place is it occurring, when is it occurring, and so on.
If this doesn’t sound clear, listed below are some examples:
- A transaction happens on an internet site. Its dimensions might be (however not restricted to):
- Transaction ID
- Coupon code
- Newest visitors supply, and so on.
- A consumer logs in to an internet site and we ship the occasion login to Google Analytics. That occasion’s {custom} dimensions is likely to be:
- Login methodology
- Person ID, and so on.
- A product is bought. Its dimensions might be:
- Product identify
- Product class
- Product variant
- Product measurement, and so on.
- A logged-in consumer opens his/her account. Dimensions of a consumer might be:
- Person ID
- Registration nation
- Pricing plan, and so on.
To sum up, dimension is a parameter that describes one thing. What about {custom} dimensions?
Customized dimension in principally any attribute that you simply moreover configure in your analytics instrument as a result of the default performance doesn’t cowl that. And that’s the place we transfer to Google Analytics.
1.2. GA4 Customized Dimensions vs Common Analytics Customized Dimensions
Though there’s a bunch of dimensions in Google Analytics (particularly in Common Analytics), they can not cowl all of the doable conditions, thus {custom} dimensions are wanted. Issues like Web page URL are common and apply to many instances however what if your small business is promoting on-line programs (like I do)?
In Google Analytics, you’ll not discover any dimensions associated particularly to on-line programs. Why? As a result of in all probability 99.9%+ of companies utilizing GA don’t have anything to do with programs. And that’s why something associated particularly to on-line programs ought to be configured manually.
Enter Customized Dimensions.
1.2.1. Scope in Common Analytics
On this weblog put up, I cannot dive deeper into {custom} dimensions in Common Analytics. If you wish to achieve this, read this guide.
In case you’re at the very least a bit accustomed to Customized Dimensions in Common Analytics, you in all probability have heard of one thing referred to as “scope”. The scope defines to which occasions will the dimension apply.
In Common Analytics, there are 4 scopes:
Person scoped {custom} dimensions are utilized to all of the hits of a consumer (hit is an occasion, pageview, and so on.). For instance, in the event you ship Person ID as a {custom} dimension, it is going to be utilized to all of the hits of that individual session AND to all the long run hits despatched by that consumer (so long as the GA cookie stays the identical).
Session scoped dimensions are utilized to all hits of a specific session. For instance, you could possibly ship the session ID {custom} dimension, and even in the event you ship it with the final occasion of the session, all of the earlier occasions (of the identical session) will get the worth. That is accomplished within the backend of Google Analytics.
Hit scoped dimension applies solely to that individual occasion/hit (with which the dimension was despatched). For instance, you possibly can ship an occasion “trial began” to Common Analytics, and along with it, you possibly can embrace a further parameter “pricing plan”. That dimension will likely be utilized solely to the “trial began” occasion.
Product scoped {custom} dimension applies solely to a specific product (that’s tracked with Enhanced Ecommerce performance). Even in the event you ship a number of merchandise with the identical transaction, every product may need totally different values of their product-scoped {custom} dimensions, e.g. “product measurement”, “product coloration”, and so on.
Why am I telling you this? As a result of some issues have modified in Google Analytics 4.
1.2.2. How scope has modified in Google Analytics 4
In Google Analytics 4, the session scope is now not out there (at the very least in {custom} dimensions). Replace: Google mentioned they’ll add session-scope sooner or later to GA4.
If you wish to apply a dimension to all of the occasions of a specific session, you have to ship that dimension with each occasion (that may be accomplished on the extent of the code (gtag) or in GTM). And the implementation depends upon the place do you could have that information within the first place. It may be in a cookie, within the information layer, or elsewhere.
To any extent further, {custom} dimensions are both hit-scoped or user-scoped (beforehand often called Person Properties).
Person-scoped {custom} dimensions in GA4 work equally to the user-scoped dimensions in Common Analytics however with some variations:
- In Common Analytics, a user-scoped {custom} dimension (set in the midst of the consumer session) was utilized to EVERY occasion of the identical session (even when some occasion occurred earlier than the dimension was set). In GA4, Person Property is ready to all of the occasions however from that individual second going forwards. Previous occasions of the identical “session” will usually are not modified (as a result of GA4 tries to ditch the idea of a “session” (to some extent)).
- The method of how user-scoped {custom} dimensions in Ga4 are configured has modified too (I’ll clarify it later in this blog post)
- You’ll be able to have as much as 25 user-scoped {custom} dimensions in a single GA4 property (which is a a lot greater quantity in comparison with the “20-custom-dimensions-limit” in free Common Analytics that applies to dimensions of all scopes).
Talking of product-scoped {custom} dimensions. Though you possibly can ship {custom} product information to GA4, in the mean time, there isn’t a technique to correctly see it in experiences. Hopefully, this will likely be modified within the close to future. Or am I lacking one thing? (let me know).
Replace: Sooner or later up to now, Google mentioned that session-scoped {custom} dimensions in GA4 will likely be out there too.
PART II: The setup of {custom} dimensions + experiences
And now let’s transfer to the 2nd a part of this weblog put up the place I’ll present you how you can configure {custom} dimensions and the place to search out them in Google Analytics 4 experiences.
2.1. The method of making Customized Dimensions in Google Analytics 4
First, let me begin with a normal overview of the method, after which we’ll check out an instance.
Google Analytics 4 is fairly versatile in relation to sending {custom} information to GA. In case you use it to primarily stream data to BigQuery after which do the evaluation there, you possibly can ship any {custom} parameters you need and they are going to be seen in BigQuery.
You’ll be able to simply ship the occasion identify, say, “joined_waiting_list” after which embrace the parameter “course_name”. And that’s it. Nevertheless, if you wish to use that parameter within the GA4 interface (and you’ll almost certainly, do), then it’s important to register that {custom} dimension within the GA4 interface. In that case, you will have to:
- Register a parameter as a {custom} definition
- Begin sending {custom} parameters with the occasions you need
The order DOES NOT matter right here. However you must do this just about on the identical time. In case you begin sending the parameter to Google Analytics 4 and solely register it as a {custom} dimension, say, 1 week later, your experiences will likely be lacking that 1 week of information (as a result of the registration of a {custom} dimension just isn’t retroactive). Nevertheless, uncooked information (e.g. streamed to BigQuery) will correctly comprise that parameter.
So, you is likely to be questioning “what’s the registration of a {custom} dimension?”. Let’s check out the instance.
2.2. Configure a Customized Dimension in Google Analytics 4
In case you are new to occasion monitoring in Google Analytics 4, you would possibly need to additionally take a look at this guide (+ video).
On this instance, I’ll be monitoring menu hyperlink clicks. Each time a customer clicks on a menu merchandise, I’ll ship an occasion and two further parameters (that I’ll later register as {custom} dimensions), menu_item_url, and menu_item_name.
Notice: menu hyperlink click on monitoring set off situations differ on most web sites (due to totally different click on lessons, IDs, and so on.). Attempt to do your finest to use this instance.
On a demo web site, I’ve a number of menu hyperlinks that I need to monitor.
First, I have to create a set off with right situations that distinguish any click on from a menu hyperlink click on. Allow Google Tag Manager’s Preview mode and check out clicking any of the menu hyperlinks on an internet site. When you do the primary hyperlink click on, you must see the Hyperlink Click on occasion within the Preview mode’s left sidebar.
In case you don’t see it, you must:
- have at the very least one Simply Hyperlinks GTM set off activated on a web page
- or have “File obtain” or “Outbound hyperlinks” monitoring enabled in your Enhanced Measurement Settings inside GA4
Let’s say, that you simply don’t use Enhanced Measurement in GA4. Go to Google Tag Supervisor > Triggers > New > Simply Hyperlinks. Maintain the set off set on “All hyperlink clicks” and save the set off.
By creating this set off, we are going to allow the link-tracking performance in Google Tag Supervisor.
Then go to Variables > Configure (within the “Constructed-in Variables” part) and allow all Click on-related variables.
Refresh the preview mode (by clicking the Preview button as soon as once more).
Then go to your web site and click on any of the menu hyperlinks. Truly, click on at the very least two of them. Return to the preview mode and you must begin seeing Hyperlink Click on occasions within the preview mode. Click on the primary Hyperlink Click on occasion and go to the Variables tab of the preview mode.
Then click on on the second Hyperlink Click on occasion. I’m at present on the lookout for some variable that I may use to tell apart a menu hyperlink click on. I don’t need to fireplace my GA4 occasion tag on any hyperlink click on. I need to fireplace it exactly on a menu hyperlink click on.
After taking a more in-depth look, I see that each hyperlinks comprise the identical Click on Courses worth, site-nav__link site-nav__link–major. By the way in which, nav means “navigation” on this context. Nice! I’ll use this in my Simply Hyperlinks set off.
Return to the listing of triggers in your GTM container and click on the beforehand created set off for All Hyperlink Clicks. We’ll edit it and add a situation: Click on Courses incorporates site-nav__link–major
Save the set off. Now, it’s time to create a Google Analytics 4 occasion tag. Go to Tags > New > Google Analytics: GA4 Occasion. Choose your current GA 4 Configuration tag after which enter the occasion identify. Its worth is as much as you. Any of the next choices are completely effective:
- menu_click
- menu
- menu_item_click
- menu click on
- and so on.
These are simply a few of the examples. Since we’re working with a {custom} occasion, we are able to identify it no matter we wish (so long as we comply with the limitations of name length, for instance).
In my case, I used menu_click occasion identify. However this time, sending simply the occasion identify alone just isn’t very helpful. You’d in all probability need to know which precise menu objects are clicked extra typically. How about we additionally ship the identify of the menu merchandise and the URL?
We may do this by sending further occasion parameters. Though you could possibly use parameters which might be already talked about within the documentation of the Enhanced Measurement (like link_url and link_text), let’s create two {custom} parameters (as a result of I simply need to present you how you can configure them).
I’m going to cross two parameters, menu_item_url and menu_item_name. I made these parameter names up and you are able to do it too. That’s what the pliability of the information mannequin gives.
To ship {custom} parameters, you have to broaden the Occasion Parameters part within the Google Analytics 4 occasion tag after which click on Add Row.
Enter the identify of the primary parameter. In my case, that’s menu_item_url. Within the Worth area, I’ll insert a variable that returns a clicked URL. Fortunately, GTM already gives such a variable, it’s referred to as Click on URL. Click on the Insert Variable button after which choose the {Click on URL} variable.
Let’s add one other parameter, menu_item_name. For that objective, GTM gives one other built-in variable, {}. Insert it as effectively. Since guests of your web site can translate your web page, {} worth may also change, therefore you will notice a extra numerous listing of collected values in your GA4 experiences.
If you wish to ship extra parameters, you’re free to do this. You’ll be able to ship as much as 25 custom parameters with a single event. These two parameters will finally turn into {custom} dimensions in Google Analytics 4.
Assign the beforehand created Simply Hyperlinks set off to this tag. Save the tag. Refresh the GTM Preview mode and click on a few your menu objects. Return to the Preview mode and click on these Hyperlink Click on occasions. Verify if the GA4 occasion tags for Menu Hyperlink Clicks have fired.
Now, you will have to go to Google Analytics 4 and verify the DebugView. You’ll study extra about that in this chapter of the blog post.
And now the time has come to register these parameters as {custom} dimensions.
2.3. Register {custom} dimensions
This is applicable to any occasion parameter that you simply ship to Google Analytics 4. If you wish to see/use them in issues like Funnel exploration, Free Type, see their reporting playing cards in commonplace experiences, and so on., you have to register {custom} parameters within the GA interface.
In Google Analytics 4, go to Configure > Customized Definitions. Since we despatched 2 {custom} parameters with the menu hyperlink click on, we should register them each right here.
Click on the Create Customized Dimensions button after which enter:
- The identify of the parameter. You’ll be able to enter no matter you need. That is simply how the dimension will likely be displayed in your experiences. You’ll be able to identify it “menu_item_url”, “Menu merchandise URL”, or the rest.
- Scope. Since we need to apply this parameter solely to at least one occasion (and to not all occasions of the identical consumer), we have to choose Occasion
- Occasion parameter. That is the place it’s important to enter its identify exactly as you entered it within the GTM tag. In case your parameter identify is menu_item_url, you have to enter it right here precisely like that. Don’t fear if the autocomplete function of that area doesn’t present your parameter but. Simply enter it and save the dimension
Then register a second parameter (in my case, that was menu_item_name) and put it aside. By the way in which, I generally use the phrases “{custom} parameter” and “{custom} dimension” interchangeably. Generally, {custom} metrics and {custom} dimensions are each grouped as {custom} parameters.
And now we wait. Inside the subsequent 24 hours, the {custom} parameters will begin showing in your Google Analytics 4 experiences.
2.4. The place can I discover {custom} dimensions in Google Analytics 4 experiences?
This weblog put up focuses primarily on the setup of {custom} dimensions in Google Analytics 4. I cannot dive deep into how you can discover insights, increase questions, reply questions, and so on. Nevertheless, I can present you many locations the place yow will discover the size you could have simply despatched to Google Analytics 4.
Listed below are a few of the experiences:
- Configure > Occasions (it will present simply the listing of occasions with counts. Nothing fancy.
- Reviews > Engagement > Occasions
- Discover (a.ok.a. Exploration experiences)
However that isn’t all. Since GA4 is an event-based analytics platform, each report is affected by occasions that you simply ship (in a technique or one other). The aforementioned experiences are simply essentially the most notable examples.
2.4.1. “Reviews → Engagement → Occasions” report
That is an summary of all occasions that had been despatched to your property + a few charts. Beneath them, you will notice a listing of occasions and in the event you click on on any of them, you’ll take a more in-depth take a look at that occasion’s information.
2.4.2. Discover (a.ok.a. Exploration experiences, ex Evaluation Hub)
That is the place the place it is possible for you to to drill down into your information. Within the Explorations, it is possible for you to to make use of experiences equivalent to Free Type, Funnel Exploration, Path Exploration, and so on.
Right here is an instance of a Free Form report. Remember that you will have to attend for as much as 24 hours for the information to return into your experiences. So in the event you don’t see the information now, be affected person.
Let’s say that I need to see how totally different system classes are interacting with the menu bar of my web site. Keep in mind, I arrange the menu_click occasion?
So, let’s go to Discover and click on on the Free Type block.
Then within the Variables column, I want to incorporate the menu_item_url {custom} dimension as a result of I need to see what number of clicks did get every menu URL. Click on the Plus icon after which discover the menu_item_url dimension. Choose it and it is going to be included within the listing of doable dimensions within the report.
In case you CANNOT see the menu_item_url (or no matter {custom} parameter are you on the lookout for), you must register that custom parameter in Configure > Occasions > Handle Customized Definitions. After which wait for twenty-four hours till the information seems within the experiences. If the experiences don’t work correctly, look forward to even longer.
Then let’s edit the Tab settings. Take away the present dimensions within the ROWS and embrace the {custom} definition that you simply need to embrace. In my case, that’s menu_item_url.
Within the COLUMNS part, I used the Gadget class dimension. Within the VALUES part, choose the metric that you simply want to see. I used the Occasion Rely.
Then you will have to filter solely to these occasions that really contained the menu_item_url dimension. In my case, that’s only a menu_click occasion. That’s why on the backside of the Tab Settings part, you must enter a filter: Occasion identify precisely matches menu_click.
That’s it, your report will now show how totally different system classes are clicking menu objects; which of them are the most well-liked and what number of instances had been they clicked.
Additionally, don’t overlook to alter the date vary in the event you want it. You are able to do that within the top-left nook of the Exploration interface.
You can too use occasion information in issues like funnel experiences, however let’s hold it for an additional tutorial (hopefully) sooner or later.
2.5. Person-scoped {custom} dimensions
As promised, it’s time to speak about user-scoped {custom} dimensions. If in case you have ever labored with user-scoped {custom} dimensions in GA3, the idea right here is fairly related. The primary distinction is that in Common Analytics (GA3), a user-scoped {custom} dimension (set in the midst of the consumer session) was utilized to EVERY occasion of the identical session (even when some occasion occurred earlier than the dimension was set).
In GA4, user-scoped {custom} dimensions are set to all of the occasions from that individual second onwards. Previous occasions of the identical session will usually are not modified).
Additionally, yet another distinction is that if you wish to ship the user-scoped {custom} dimensions with GTM, it’s important to use a special part within the GA4 tag (see the screenshot beneath). Use Person Properties, not Fields to Set.
I do know, it was not the perfect choice on Google’s behalf to make use of “Person properties” and “Person-scoped {custom} dimensions” in the identical context.
If you ship the consumer properties to Google Analytics 4, you additionally need to register them as user-scoped {custom} dimensions within the GA4 interface. To do this, it’s important to go to Configure > Customized Definitions > Customized Dimensions and click on Create Customized Dimensions.
Then enter the next settings:
Be certain that the scope is Person.
As at all times, you’ll have to look forward to as much as 24 hours for the information to begin showing in experiences.
Customized Dimensions in Google Analytics 4: Closing Phrases
In Common Analytics, Customized Dimensions had been extra like an intermediate function and plenty of entrepreneurs weren’t even utilizing it (insert unhappy emoji right here). With the rise of Google Analytics 4, {custom} dimensions have turn into the elemental performance that’s wanted even for very learners. If you wish to monitor an occasion and embrace any further textual content parameter, you’re principally coping with {custom} dimensions.
The method is fairly easy right here. It’s important to ship some {custom} information to GA4 and it’s important to register a parameter as a {custom} dimension (if you wish to use/see that parameter in common Google Analytics 4 experiences).
However if you’re utilizing Google Analytics 4 simply to stream information to BigQuery and do the evaluation there, then there isn’t a have to register dimensions. Even unregistered parameters will likely be out there in BigQuery.
Bought some questions on {custom} dimensions in Google Analytics? Be happy to put up a remark beneath.