New Google Tag and Settings Variables in GTM (Missing GA4 configuration tag)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Google has just released two new things in Google tag manager a template called Google tag and two settings variables this means that the setup process of Google analytics 4 is also changing let's take a look also did you know that 85% of you are not subscribed if you want to stay up to date with Google analytics Google tag manager and get this kind of videos first then subscribe to my channel if you want to install Google analytics 4 with Google tech manager the installation process will look like this you go to your Google tag manager account then go to tags new tag configuration and then you select Google tag as you can see the Google analytics for configuration tag that we had in the past is no longer here so select Google tag then you're asked to enter the tag ID in this case you can enter the Google analytics for measurement ID which starts with g- and then something you could also enter the AdWords ID or you can even enter the actual Google tag so Google tag ID can be found in the list of all containers that you have and then you switch to Google Tags and here you will find the list of those IDs and some of them start with GT however personally since I'm working with Google analytics 4 I will be using the measurement ID and that ID can be found in the usual place where you could find that before so you would need to go to admin in Google analytics 4 then data streams select your website data stream and then you copy the measurement ID so now if I copy it then I can paste it right here then your goal here is to fire your Google tag as soon as possible and ideally it should be the first tag of Google that you should activate before any other ga4 event tag so in triggering you can click anywhere and then select initialization or consent initialization but normally I select initialization so this is the basic setup that will install Google analytics it will also activate enhanced measurement if you have that enabled in your G4 property so let's call this let's say Google tag and then you can paste that measurement ID or you can call this GA config or whatever the name here does not matter that much so now click save and let's test how this is working so I will click preview then I will enter the URL of my test website and I see that my tag assistant has connected and the Google tag has fired now if I go to the debug view of of Google analytics 4 I should see the events incoming right here and here they are so in this case the Google tag template kind of replaces the Google analytics 4 configuration tag that we had before if you want to set some additional parameters you can open your Google tag and then here you can enter either configuration settings or shared event settings in the section of configuration settings you should enter things such as maybe the URL of your server site endpoint if you're using server side Google tag manager or you could enter some cookie settings and there are more parameters below this video I will post a link to a documentation where you will find a list of various parameters which are supported and what are the parameter names and what do they mean also there is a new setting for a configuration settings variable but I will talk about this a bit later in this video Then There are shared event settings so if you want to share some parameters across multiple events for example a modified page URL or maybe some hit timestamp or something like that then you can enter them right here in this section we also have another settings variable and again I will explain it a bit later in this video however when it comes to event parameters there is another list in the documentation of supported parameters I will post a link to those parameters below the video as well but for now let's keep this setup simple let's take a look at how should we configure eventually tracking in Google tech manager now let's say that I want to track menu link clicks right here first I will need to go to Google tech manager variables and then enable buil-in click variables like that once I do that then I will go to the triggers and we'll create a new link click trigger so I will click new trigger configuration and then just links instead of all link clicks I want to track just some link clicks where the class of the element contains this part right here so click classes contains this let's name the trigger and then click save now let's go to the list of tags click new tag configuration and here we will need to select the good old G4 event tag that we have already used in the past however this part right here has slightly changed in the past we had to select the configuration tag but right now we need to enter the measurement ID and here I have to enter the same measurement ID that I used in my Google tag if you forgot it then you can go back to admin of Google analytics click data streams then click your data stream and copy the measurement ID so you can either do this or we could do something else but first take a quick look right here when you enter the measurement ID Google tag manager will validate that and it will show if Google tag was found in this container so after you enter the measurement ID Google tag manager will check the entire container and we'll look for a Google tag that contains the same measurement ID but naturally you will have more than one maybe more than 10 or more than 100 Google analytics for event tags so manually entering the measurement ID every time is inconvenient that's why I would recommend using a variable just for the measurement ID right here so I will remove this and instead I will click plus and then I will click Plus right here to create a new variable variable configuration and then select constant here we will paste the measurement ID and then I will name this variable let's say like that so now I click save and this variable will be inserted right now the validation doesn't happen automatically that's why I will cut it and then paste it again this obviously looks like a bug so I hope that eventually Google will fix this then let's add the event name I can call this let's say menu link click and then I can also track several parameters like link URL and Link text so I can either use the settings variable but again we will talk about this a bit later so this time I will just add the event parameter the first one will be link URL and the other one will be link text if you see the check mark right here it shows that this is a known parameter or in other words a supported default parameter of Google analytics if you enter some custom parameter which will still work then that parameter will not show the check mark for example user group or something like that as you can see there is no check mark now let's set the values so for link URL I will use the click URL and then for link text I will use click Text in this video I will not be going too much into the mechanics of how event tracking Works in general because I have other tutorials on my Channel or on my blog where I explained that in this video I am mainly focusing on the change of Google tag and the workflow flow of how event tracking is configured in the event tag you can also configure user properties this section is not available in the Google tag so you can configure this either in the event tag or in the event settings variable now let's go to triggering and choose the trigger that we just created and let's name this variable click save let's refresh the prevote and test if this is working and now I will click let's say this link right here in the preview mode of Google tech manager I have the link click I click the tag that fired and I see what kind of parameters were sent and in the debug view of Google analytics 4 I should also see that event appear and here it is I click it and I see some parameters most of them are automatically tracked but also there are several parameters that I configured myself now in the future if you decide to add more event tags the process will be the same you just go to tags new tag configuration then G for event then you look for your constant variable as you can see the validation still doesn't work but let me test something maybe it will work if I enter it just by typing double curly braces and this time it looks like it does work so maybe that's a temporary workr for you instead of just copy pasting or deleting and adding that variable again and then you configure your event name parameters and so on on and now we'll take a look at settings variables but before that first let's take a look at the problem that we had with the Google analytics 4 configuration tag in the past let's say that we have a website it is a single page application and on that application we fire a Google analytics for configuration tag in that tag we also set a custom parameter which will be later displayed as a custom dimension in the reports in this case we want to send a page category parameter with every event to Google analytics for so when the visitor lands on an article page then the page category value will be article and then if on that page a Google analytics for event tag fires which uses the same configuration tag then that event tag will also send the page category with the same value articles and then all other subsequent events will do the same thing however we're talking about single page application which means that if the visitor goes to another page the browser window does not actually reload it just dynamically loads a new page content which means that the configuration tag never refires again so even though the page category changes from articles to homepage if the event tag fires on the hom page the page category will still be articles because it inherits the page category from the initial load of the configuration tag and this was a big pain in the ass so we had to do a workaround meaning that we had to configure page category parameter in every event tag as well and if you have hundreds of G4 event tags that becomes quite a manual work however this problem can be solved with the new settings variables especially the event settings variable let's go back to the example of My Demo website let's say that I have asked a developer to push the page category to the data layer and in my preview mode I see it as the first message so here is the page category and it's a homepage because I am on a homepage so if I want to apply this parameter to automatically track events and also I want to apply it to all other events that I have in my container I can include it in the events settings variable so let's go to Google tech manager then click variables and click new in the userdefined variable section click variable configuration and then look for Google tag event settings here I can add the parameter so let's say I will call it also page category and here I have to enter the value or in other words the variable that will fetch the data from the data layer so I will click the plus to add the variable then plus to create a new variable variable configuration and let's select data layer variable here I will enter page category exactly as it is displayed in the preview mode then I will name this variable and click save if you want to add more parameters that apply to all events then you can add them by clicking this button right here now let's name this variable something like that and then click save now I go to tags and I will need to include this variable in all Google analytics event tags and also in the Google tag so first let's start with the Google tag then click the pencil shared event settings and then select the ga4 event settings so when this variable is configured then that page category parameter will be applied to events such as page view which is automatically tracked file downloads which are automatically tracked and so on you can also see which parameters are inherited from this variable by clicking this button now I can click save however if you leave this configuration as it is you will not solve the problem that I previously explained because this variable right here will be evaluated only when the tag fires and in my case the Google tag will fire just once per page because it will fire on initialization so if you want to also dynamically fetch the latest value of the page category for all your other events you need to update your event tags as well so let's go to the event tag then click the pencil and then here we will also add the event settings variable in the event parameters so when this tag fires it will fetch the latest values of the settings variable and that way we will solve the problem that I previously explained if you have 10 or 20 or 50 tags and you want to benefit from this update then update all those tags in the future if you want to add some parameter to all your G4 event tags you will not need to go manually and update each tag separately instead you will just need to go to the variables and then click the ga settings variable and add that parameter here from that moment all tags that use this variable will also Al fetch the latest values of the variables so let's see how this works click preview and here the preview mode has refreshed here is the message with the page category here my Google tag fired and if I click it I can also see that the page category was sent and if I go to the debug view of Google analytics I will see the page view and here I see the page category with the homepage now if I click the link because I have already configured the menu link click tracking I will see that in the previe mode my menu link click tag fired and in Google analytics debug view I will see my menu link click as well I can click it and here is the page category but now let's emulate the situation where the page category changes without reloading the page I have that event in the data layer it says the page changed and the categories now articles so now if I click any of the menu links it should work properly and fetch the Articles page category not the homepage let's check how this works here's the new menual in Click I click it and now the page category is articles so every time the tag fires it takes the latest values of the variables that are configured in the settings variable so this was a huge paino when you were configuring ge4 event tags but now this process has been made more convenient however there is one C as you probably know Google analytics can automatically track some additional events like outbound link clicks so I will scroll down to the footer and I will click an outbound link this should send a click event to Google analytics for let's check that in the debug View and here it is if I click it and I go to page category unfortunately it still fetches the previous value because this page category configuration is coming not from the event tag but from the Google tag and Google tag was never ref fired again on this page it just fired once on the initialization event so in this case a solution for you could be to fire the Google tag on page changed as well because when Google tag fires it will fetch the latest values stored in the settings variable right here and then automatically track events such as scroll albone link like tracking they will get the latest value with which should have been articles not homepage but if you fire the Google tag several times on the same page keep in mind that the newly fired Google tag will overwrite the configuration of the tag that fired previously and I mean that the Google tag will overwrite another Google Tags configuration if in both cases the tag ID is the same so if Google tag XYZ is fired once and then for the second time Google tag XYZ fires again then the TX configuration that fired on the second time will overwrite the configuration that was before so that's how the event settings variable works there's also another settings variable which is for the configuration that variable can be used in the Google tag not the event tag so if you click the Google tag and then you try to edit it there is a section called configuration settings you can expand it and you can select the configuration settings variable the principle here is similar but from what I've seen so far most of the business will probably not need to use that because most of the companies at least the small and medium ones they will probably be using just one Google tag because maybe they are using just one property so in that case manually entering parameters such as cookie prefix or something like that is enough to configure just in the Google tag itself instead of creating a variable and then applying it just in one tag but if you have multiple Google Tags in your container then it might make sense to create a configuration settings variable and then apply to multiple tags at the same time instead of creating a bunch of different parameters in those tags separately looking at the documentation it looks like Google wants us to use custom dimensions and similar parameters in the event settings variable for example here we see things such as coupon or items or method shipping tier and so on while the configuration settings variable should be used for more global settings such as campaign source cookie settings and so on but I did several experiments so for example if you set the custom parameter which is a custom Dimension basically in the configuration tag and in the event tag both of them provided the same results the parameter was sent properly to Google analytics 4 so this whole update with settings variables but they're like two variables becomes a bit more confusing for users honestly I'm still learning this myself so this video is more like an observation of what I have learned and what are my experiments and I'm pretty sure that in the near future we might learn more things as more people will start using this and maybe there are more caveats or more benefits of this now let's talk about user properties which can then become user scoped custom dimensions in Google analytics for previously you were able to set the user properties on the Google analytics 4 configuration tag level but now if you go to the Google tag here you will see just the shared event settings and configuration settings there are no user properties here however if you go to the ga4 event tag template here you will see the event parameters and you will also see the user properties you can also manage the user properties in the event settings variable as well you can just click on this button and then here you will see Google analytics user properties you can add a property for example pricing plan and then you can insert some value right here so this looks like the process of setting user properties has become a bit more complicated especially for beginners basically you could have an event settings variable then inside that variable you would set the user properties and this variable should be set in both event tags and in the Google tag in fact there are even more options of how can you set the user properties for example you can set them directly in the configuration tag but that actually requires dealing with some custom code and I mean like you would need to create a custom JavaScript variable that returns an object of all properties but for beginners it might get a little too technical what we are looking here at is a snippet of sim moa's blog post about Google tech template in Google tech manager so if you want to learn some additional details about the user properties key then I will post a link to SOS article below the video so at least for now the option where you have the event settings variable and you insert the pricing plan and then you insert some variable that Returns the pricing plan or something like that might be the most convenient but again time will show this is a very new thing in Google tech manager and maybe after several months we will learn about something else maybe some caveat that will change the recommendation and that's it keep in mind that this is a gradual roll out if you don't see this new update in your container yet don't worry it will soon appear you might be also wondering what should you do with your current ga4 setup Google says that they will do the migration automatically so there is no action needed on the other hand it's Google and their migrations can become quite messy sometimes so I will probably randomly check several containers after the migration just to make sure right now I would say that there is no need to worry because this update with Google tag is more cosmetic what are my thoughts about this event settings variable great it's a very welcome update in fact it's a shame that this was not available on day one one when G4 was launched configuration settings variable eh it's a weird Choice as a user I would have probably preferred just having one settings variable for everything but again I don't know the full context here also the management of user properties is a bit weird as for the Google tag I understand why Google did this but as a user I would have preferred keeping the old configuration tag and then you use the settings variable inside it if you found this video useful hit the Thumbs Up Button below the video that will help me understand what videos do you like and what should I create in the future also if you want to learn more about Google tag manager or G4 then consider subscribing to this channel my name is Julius this is analytics Mania and I'll see you in the next [Music] [Applause] [Music] video
Info
Channel: Analytics Mania - Google Analytics & Tag Manager
Views: 65,682
Rating: undefined out of 5
Keywords: google tag manager, google analytics, google tag, ga4 settings variables, event settings variable, configuration settings variable, google analytics settings variable, google tag manager variables, missing ga4 configuration tag, missing google analytics 4 configuration tag, missing ga4 config tag, missing google analytics 4 config tag
Id: 1POi1BZxXwg
Channel Id: undefined
Length: 23min 3sec (1383 seconds)
Published: Wed Sep 06 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.