Google Tag Manager Tutorial for Beginners (2023)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you are a digital marketer or digital analyst and you want to implement marketing and analytics codes much faster for example google analytics then google tech manager is exactly what you need but how to get started how to properly create your first setup without wasting too much time looking for the right learning resources in this video i will show you exactly that we will learn how to get started with google tag manager how to install google analytics 4 and more [Music] what is google tag manager the best way to explain that is to show an example here's a company maybe it's your company where you're working or maybe that's your client's company and hopefully just like probably any other business that business should have at least one website or maybe several of them and in order to measure how those websites are contributing to website success uh you need to use tools like google analytics or google adwords and that's where you as a marketer or maybe web analyst join the game you need to install these tools their code on your website so if we're talking about google analytics you need to place a little piece of code of javascript onto that website and in the old days the only way or at least the most common way was to ask a developer for example you have a bunch of codes that need to be installed on the website and you ask a developer hey can you do this or that or whatever then a developer returns with a lot of questions probably for example asks like when should these codes exactly be fired on a page or maybe if you're asking for some custom data like what custom data do you need to pass to google analytics or google ads or so on so you are sending emails using slack and sending a bunch of messages back and forth until you finally reach the agreement that a developer will implement your codes however that doesn't happen immediately because developers have their own priorities they have their own deadlines so usually it takes days weeks sometimes even months if we're talking about very large clients so it takes a lot of time for a developer to add those tracking codes to the website and each tracking code is called a tag now with google tag manager what you could do is that in many cases you could eliminate this part of the chain and you could implement those tracking codes by yourself so for example if you want to fire a google ads conversion tag on a thank you page you can do that with help of google tag manager by yourself so basically google tag manager it works like this you have a website and then on that website you implement google tag manager so a developer adds a google tag manager container code on that website and then it activates gtm from that moment you are able to manage your tracking codes with the help of google tag manager and for example if on a website a visitor clicks a button and you want to track that as a google analytics event you can do that because google tag manager will activate a google analytics tag and will send that information about a click to further tools so basically google tag manager is a middleman between your website and third party tools for example google ads google analytics and so on so in the older days you needed to ask a developer to add those tracking codes from now on in many cases you will be able to do that by yourself and you will be able to add event codes page view codes and other tracking codes of let's say google analytics or other tools in google tag manager interface and gtm will take care of when those codes will be activated on a site google tag manager has a lot of benefits to offer so one of them was kinda a bit mentioned in the previous slide so all of your tracking codes are in single place because previously when a developer was managing codes in many cases those codes were scattered across the code of your website from now they will be controlled in a single interface of google tag manager then you are less dependent on developers of course this does not mean that gtm will completely replace developers in some cases you will still need them and in some lessons of this course you will notice that you can add edit remove tracking codes much faster in the older days with developers you were lucky if you were able to get that code implemented on the same day but sometimes you had to wait for weeks or even months to have those codes added on a site so right now with gtm you will be able to add that test it and hit publish within minutes maybe hours but definitely not days or weeks google tag manager's popularity is still growing so this means that there is a very helpful community there are various resources there are many people who can help you so you're definitely not lost and you're definitely not alone in this journey to learn google tag manager first let's create a google tag manager account and container to do that go to google.com tag manager and you will see a page that looks something like this even if it looks a bit different for you just keep looking for a button that says start for free click it and then you will see different view depending on whether you have an account or not so if you are completely new to google tag manager and you never had access to any google tag manager container you will see a view like this and if you already have at least one google tag manager container a view might look something like this in that case click create account and you will be redirected right here now let's create a google tag manager account here you can enter your company's name just for sake of demonstration purposes i can enter something like gtm course then you can choose your country you can decide whether you want to share data anonymously with google and then you can enter the container name in this case you don't have to enter the url right here it can be just a simple word or several words for example blog support website main website something like that or of course you can enter the domain from what i have seen in most cases people are creating one container for one website therefore you can of course enter here the domain of the site but right now we can enter gtm course website in this course we will be focusing on the web container therefore choose this one and click create speaking of other types of containers this one is for ios apps this one is for android apps this one is for accelerated mobile pages also known as amp and then this one is for server side google tag match implementation so click create then you will need to agree with terms of service and then you will see a pop-up like this now google tag manager is asking you to add both of these codes to your website for now let's close this and we will get back in upcoming lessons before we continue first let's take a look at the structure of google tag manager account here you have a google account now this account is designed to help you access all of the google products like google analytics google ads gmail youtube or anything else when on google tag manager website you clicked start for free and then you were logged in into google tech manager interface you are actually using your google account then when we logged into google tag manager we were asked to create a new google tag manager container now the best practice is to have one google tag manager account per business so if you are a business that has five websites you should have one google tag manager account and within that account you could have multiple containers usually one container is for one website of course let's say if you have five very identical websites and the only thing that differs is the language then you could have one container for all five websites but in most cases it makes more sense to have one container for one website so if you have a main website blog support page something else then each website could have a different container why different container because in that container we will be having tags triggers and variables now i will talk about them a bit later but basically your tracking codes will be held in that container and usually tracking codes are different for each website therefore it makes sense to have a separate container for every website before we continue here's a quick disclaimer google tag manager is an ever evolving tool so what does it mean that google is constantly updating the tool adding new features sometimes even changing the design so there is a slight chance that the view that you are viewing in your browser will be different from the view that you see in my video alright so now we are in the container of google tag manager a container is a place where you keep all your stuff related to web tracking so for example if you want to implement facebook pixel google analytics google ads all those tracking codes are stored in a container and when a visitor lands on a website first google tag manager is loaded i mean the container is loaded and then from that container various tracking codes are activated based on your conditions in the top menu bar we have three sections workspace versions and admin and right now we are in the workspace so this is the section where you will be spending most of your time because that's where the actual work is happening and on the left side you will find sections like tags triggers variables folders and templates tags are basically tracking codes that you want to activate under certain circumstances triggers are those conditions that define when the tag should fire and variables are usually little pieces of information that you can use in your setup or maybe some little helper functions but let's not focus on that right now then you can also keep things in order by having folders and keeping your tags triggers and variables in separate folders this works pretty much the same as folders in your laptop when you make some changes in a container and you want to test that then you will need to click the preview button right here and then we will enable the preview mode that allows us to test everything just within the boundaries of our browser and when you make sure that everything is working fine as you expected then you will need to publish the container and that publishing process starts by clicking the submit button right here when you click this you will need to enter the version name now this is optional but i highly recommend that you enter some descriptive and brief name of a version and we will do that a bit later in the course i mean when i explain how to do that so when a container is published what happens is that a new version of a container is created and you can see the list of versions right here in the future when you will be working more with google tag manager you will have more items in this list for example right here i have a container already with four versions now the reason why versions are useful because if in case you publish something incorrectly and maybe some tracking functionality breaks your website's actual functionality because that is possible you can then quickly revert to the previous version and let's say publish version 3 to your visitors because you know that the breaking changes were introduced in the version 4. and then the last main section of google tag manager interface is the admin so here we have account settings and container settings here you can click install google tag manager and here you will see two tracking codes that must be added by your developer to a website then you can also see container or account activity you will see who did what then you can import container or export container so this is quite useful for example if you want to reuse some parts of your container in another container so you can just click export select what you want to export and then import those items in another container also here we have user management so you can set some permissions on the account level this means that your coworker will have access to multiple containers at the same time or you can set permissions on the container level if you want to create an additional container in this account you can click on this plus icon right here also one more place where you can get the tracking code of your google tag manager i mean the same as it is right here you can go to workspace and you can click on this container id right here and you will see that pop-up that we saw initially after we created the google tag manager container and that was a quick overview of a google tag manager interface to install google tag manager you have to add two google tag magic container snippets to the source code of the website usually this job is done by a developer you can get those two container codes by clicking on the container id in your google tag manager interface click it and then you will have to send these two codes to a developer in this video i will show an example of how to add these two codes to the source code of the website now keep in mind that this is just an example and every website might have different content management systems code base or something else so i just wanted to show you this because i want you to get a better idea of how things work but remember that usually this is done by a developer so if we read these instructions you will see that this code must be added somewhere in the head of the website and this code must be added somewhere in the body of the website if you don't know yet website's html code is split into two parts the head part and the body part head part is responsible for various settings loading scripts meta description meta keywords meta title and so on while body is responsible for the content so let's copy the first code i can just mark this copy like that and then i will go to the content management system of one demo website and here i am already in the code editor of that website and then here we have the opening head tag so this means that this is the beginning of the website head and here below somewhere we have the closing head tag the closing head tag always has this slash right here now it's perfectly fine to add google tag manager container code i mean the first code before the closing head tag right here like that and then after the head ends we see the opening body tag it might look like this on some websites it might look like this so below this body tag it is recommended to add the second code which is right here so copy this part and then paste it right here now the first code is essential for google tag manager to work so this must be added somewhere in the code it's recommended to have it in the head but if your content management system does not allow to add custom code to the head it is still fine to add it to the body but the sooner you load your google tag manager container snippet the better and speaking of the body well now i'm not going to dive into details but keep in mind that this is optional you don't have to add this but if you add it then it is recommended to do so right after the opening body tag right here so this is the opening body tag that contains no slashes and then after that we add the google tag manager no script code right here if you want to learn more details about the installation of google tag manager for example why is this code not necessary or where can you add it or various scenarios where this code is added to the head to the body and so on i will post a link below this video so once you or your developer installs google tag manager container snippets on a website then let's click save and then let's check whether google tag manager is working properly let's go to google tag manager click on preview and then you will have to enter the url of your website click start and if you see the connected widget right here that says connected and if you see that google tag manager preview mode has also connected right here this means that google tag manager has been installed properly so this is how you can install google tag manager on a website where you or your developer has a direct access to the source code of the website now if you are working with some popular content management system or maybe some popular e-commerce platform like woocommerce or magento or wordpress there's a very high chance that someone has already developed a plug-in that will help you install google tag manager much faster if you already find this video useful it would really help me a lot if you click the thumbs up button below the video also if you want to properly learn google tag manager and google analytics then subscribe to this channel let's talk about three main components of google tag manager that you should be aware right now the first one is tag a tag is usually a tracking code that you want to implement on your site it might be facebook pixel event tag it might be google analytics page view it might be google ads conversion code or whatever so if you want to activate a certain tracking code on a site that is a tag then there are triggers triggers are conditions when you want your text to fire so if for example you want to activate your google ads conversion tag when a visitor signs up for your newsletter that is a trigger other examples of triggers might be a page view a click of a certain button when a visitor scrolls for more than 25 of your page and so on and then there is a third component which is called variables variables are little data points that you can use in tags or triggers sometimes variables might contain more information sometimes variables are even more complex functions but in this case you should start simple so you can just think of variables as data points that can contain a single value or maybe a bit more complex but still some information some data or some configuration when i explain tax triggers and variables to google doc manager users i usually like to start with three questions so the first question is what do you want google tag manager to do so for example if you want to track a conversion that's a tag if you want to implement a chat widget on your website and that chat widget requires to add a code that's a tag another example could be if you want to track a page view and send that page to google analytics that is also a tag then the next question is when do you want that to happen so for example if you have a google ads conversion tag the question is when do you want to track that conversion one of the examples could be when a form is submitted when a button is clicked or something else so all of these situations are triggers and then the last question is what when or how exactly so if you want to be more specific that's where variables come in for example if you want to fire your tag on a page view the question is do you want to fire on all page fees or do you want to fire on a specific page so if for example you want to fire only on one specific page then the page address is the variable because you want to fire your tag only when a trigger is page view and the variable is let's say page url contains thank you or order successful or something else so let's go back to that very first slide where we had tags triggers and variables so once again tag is a tracking code that you want to fire but i mean not only tracking code that code might not track users that code might i don't know change the color of a button or something else but in general tag is a piece of javascript that you want to activate on your site then a trigger is a condition when you want to happen and then variable is a data point or i don't know some set of information or maybe some function that you use to either to make the trigger more specific or to transfer that particular data to third-party tools and i believe that variables are the most confusing at least they were for me when i was just starting to learn google tag manager so we can take a look at this a bit differently at first we have a tag in this case it's google ads conversion tag so what do we want to do we want to send a conversion data to google ads then the question is when do we want that to happen and that's where triggers come in and our condition could be well we want to fire our google ads conversion tag on a thank you page but google tag manager is not a human it's a system and google match does not know what a thank you page means we need to be more specific we need to instruct the the system to behave as we want so in this case that's where variables become very handy we want our trigger to fire not on any page view but only on those pages where a variable which is page url contains purchase successful because we know that a visitor lands on this page only when that visitor has actually purchased something so this is our conversion now you might be wondering all right so this might look quite clear i mean you can probably understand why this variable is used right here but what about a variable in a tag what kind of variable can we use in attack and make use of it and an example could be like this what if we could send not only the fact of a conversion to google ads but also the order value and that's where another variable could be used in this case we could send the variable which is order total and that variable could send the value of 30 to google ads and in this case we could see not only the number of conversions but we can also see the number of revenue that was generated because of google ads before we continue i wanted to give you a quick introduction to google analytics 4. now keep in mind that this course is a google tag match course so we will be focusing more on installing tracking codes and sending data to tools for example like ge4 but in this course i won't be diving deeper into how to analyze that data or how to get insights from it because that would be a job of the google analytics 4 course not equal tech manager and now let's take a quick overview of what ge4 is so google analytics 4 is a platform that allows you to connect data from multiple data sources for example if your business runs several websites and also an android app and ios app in google analytics 4 it is much easier to streamline and collect data in a single property because of this the structure of the property is also different if we compare that to universal analytics which is also known as ga3 in google analytics 4 we have property and then we have data streams so these are sources of the data from which the data then comes into the property if you are new to google analytics 4 you should go to analytics.google.com and then sign up once you create your property then you should go to the admin and then in the property column you will see a section called data streams click it and here you will see a prompt asking you to create at least one data stream but at this point also there's a high chance that you already have at least one data stream if you plan to use google analytics 4 only to analyze your website then that is perfectly fine and it will be enough for you just to create one web data stream and in this course i will be specifically focusing only on web platform i will not be covering anything related to android or ios so let's click on web and here you will have to enter the url of your website the name of your data stream for example it can be the name of your website and here you will see some additional options which are called enhanced measurement compared to the previous versions of google analytics ga4 is capable of tracking not only page views but also some additional events like scrolling outbound clicks or in other words links that redirect visitors to other websites then video engagement which applies to embedded youtube videos site search and file downloads if you don't want google analytics to track these events you can disable them one by one by clicking that gear icon or you can disable enhanced measurement altogether by clicking this toggle but for demonstration purposes let's keep this as it is and then you can enter something like you know your own website but in my case i can enter www let's say i don't know mywebsite.com or something like that and then enter the webstream now click create stream and then you will see this view the first part looks similar to the view that we saw previously but also you will have some additional settings right here so once you create your first data stream you will see several tagging options or in other words how to install google analytics for on your website for example you can add google analytics for tracking code directly to the source code of your website or you can use google tag manager and later in this course i will be covering exactly this part also it is very important to notice this part because you will be using this measurement id multiple times in the future when you will be working with google tag manager if you are familiar with the previous version of google analytics which is called universal analytics you probably know that there were different data types that were sent to google analytics or in other words actually data structures for example we could send page views then we could send events e-commerce data then social interactions because there were actually dedicated reports just to social interactions then timing for example page speed or something like that and there were even more data types that you could send to google analytics 3. on the other hand everything was simplified in google analytics 4 and now you can send events so everything that you send to g 4 is event page view is an event ecommerce data is an event and so on and after google analytics 4 is installed and after you collect some data you will start seeing those numbers in reports there are standard reports and they are available in the reports section also if you want to go deeper and explore your data and create some advanced analysis you can go to the explore section also there is an advertising section that is related to attribution and how you analyze various traffic sources and how are they contributing to your overall success and then there are some configuration settings right here now don't worry about the installation yet because i still haven't showed it in this video but i will do that a bit later so if we go to the reports section here we have some standard reports like real-time reports where you can see what has been happening on your website for the last 30 minutes then we have acquisition reports where are your visitors coming from like what kind of traffic sources like are they coming from google search maybe they're coming from paid search paid advertising or maybe somewhere else then we have engagement so engagement shows what kind of events are happening on your website if you're sending them then which pages and mobile app screens are your visitors visiting the most then we have monetization reports which are also known as e-commerce reports if you're working with an e-commerce website then there are retention reports but because of some web tracking limitations i don't rely on them a lot then we have demographics reports if you enable additional features that are called google signals then you will get some additional details right here for example the age of your visitors gender and some additional information and then we have also some deck reports for example if we click on tech overview you will see what kind of operating systems are your visitors using what kind of browsers and so on for more advanced analysis you should go to the explore section and this is actually the place where i spend my time the most so once you click explorations or explore in the sidebar then you can choose from one of several exploration techniques for example if you want to prepare a certain table and see the data then you can choose the free form exploration now as i've said in this video i won't be diving into how to actually use these reports because there is some learning curve and this would go out of scope of this google tech manager course now speaking of other features in the exploration section you can click on plus icon right here and then click funnel exploration now this is much more powerful compared to the previous google analytics versions because in ga4 you can also work with the historic data in your funnel analysis actually let me show you a quick example of a funnel here's one of the examples and you can add some additional features you can make your funnel open you can even see how funnels are changing over time so if you have some time you can definitely play around with these settings and take a look at what kind of insights can you get then another fairly popular exploration technique is called path exploration this might look for you familiar if you have worked with flow reports in google analytics 3 however this one is much more powerful so if you start path exploration you can go not only from the beginning of your path and then dive deeper but you can also start over and start from the end of certain path for example you can decide to use purchase event as your ending point we just need to find that purchase event and once you find it you click it obviously purchase event tracking is an additional feature that you have to implement by yourself because that data is not available in g4 by default and then from that purchase you can then go back and try to understand where those visitors are coming from or actually what are they doing on your website before they make a purchase so this might give you some insight or maybe you might even find some loops where visitors are jumping between one page and another and maybe there are some problems that your visitors are struggling with then as i've said there is an advertising section where you can play around with different attribution models but again this goes out of scope of this google tech manager course then in the configure section personally i spend a fairly solid amount of time right here since i'm working with implementations i use a lot one feature which is called debug view and in this course we will also be looking at this feature so debug view is a very convenient way that will help you to debug the data that you're sending to google analytics for and that way you can make sure that you're actually sending data properly and the incoming data might look something like this where you have a feed you can see what kind of events you're sending you can click on that event and you can see what kind of information was sent together with that event then here you can also configure things like conversions so in the past they were called goals but now they are conversions or in other words conversions are some particularly important events to your business for example purchase or maybe someone subscribes your newsletter or maybe something else by the way keep in mind that google analytics 4 is always under heavy development so there's a very high chance that when you watch this video something in the interface of ge4 will look different because maybe google will add some new features or maybe they will move certain features or maybe they will rename something so keep that in mind and then the final section that i want to quickly mention is the admin section so if you want to add new users or maybe create new data streams or maybe import some data or connect google ads with google analytics for or maybe connect with search console you can do that by going to the admin section right here because when you create a property it is under your account and a single account might have multiple g4 properties g3 properties and so on and that was a very brief introduction to google analytics 4. i could speak hours and hours about this platform but again this goes out of scope of this course because we are going to focus on how to use google tag manager to install ge4 and how to send data to ge4 so we will still be going back to this interface and we'll use certain features that will help us to do that let's log into google analytics you can do that by going to analytics.google.com and then if you have at least any property you might see a view like this or maybe you will see something else if you haven't yet created a g4 property you should go to admin and then click create property right here right now i am in an account where i don't have enough permissions therefore i will switch to another property now i am on a different property and as you can see the button is blue so you should click it and then you should enter the name of a property for example it might be your website name i will call it something like my demo website then you should select your time zone you should select your default currency and then click next and after that you will need to answer several questions or just click create because these questions are optional and once you do that then you will see something like this so here you need to create a data stream because as i've said before data stream is a source of data from which you will be getting information into your google analytics 4 property and here you should enter the address of your website and then the name of your website once again and after that click create stream now i won't be doing that because i have already created a google analytics for property but if you're new to this then enter information in these two fields and then click create stream when you create a stream you will see something like this now if you already had a ge4 property from the past then you will still need to go to the admin section and then you will need to open your account and after that you will need to find your google analytics for property in this drop down once you find that then click data streams and then you will have some data stream right here if you see a globe icon this means that this is a web data stream so now you should click on it and what we are looking right now for is this part because in google tag manager we are going to use this kind of measurement id this id will tell google analytics that when we send data we want to send data particularly to this data stream and therefore this means that it will reach our own ga4 property so now let's go to google tech manager here i have a new container so you should already have this created by now then click tags and create a new tag by clicking this new button then click anywhere on tag configuration because when we create a tag we have to think of two things one is what is this tag going to do and then when will this tag is going to fire so first we want to answer the what question and this means that we want to send data to google analytics form click anywhere on tag configuration then select ga4 configuration tag because this is the tag that all your g4 setups with google tag manager should contain and click on the tag and here we have to paste that measurement id that we got in the g4 interface so let's go back to ge4 that data stream and click this icon to copy the measurement id click it and then paste it right here this is the very basic thing that you need to do when you want to install ge4 now we have to configure when we want this tag to fire do we want to fire it on some pages or do we want to fire it on all pages and when i say all pages i mean all pages where google tag manager is installed so now let's go to the triggering section here click anywhere and by default you will have several triggers in the future when you work more with google tag manager you will have more triggers because triggers are conditions when you want your tags to fire in our case we want our tag to fire on all pages and as i've said all pages means all pages where gtm is installed so let's select this trigger and this is it this is the very basic setup in order to install google analytics form but we are not done yet there are still several things that i will explain a bit later now let's name this tag usually i name it like this ge4 config and then enter the measurement id because in some cases you might find yourself in situations where you will have several different configuration tags in a single container now click save when it comes to adding tracking codes or in other words tags in google tag manager ga4 is not the only tool that is supported if you click new while being in the tags section and then click on tag configuration you will see a bunch of other templates that are supported you can see universal analytics ge4 google ads also if you scroll down you will find even more tools then there is a community template gallery so if you click on it you will see a list of templates that are not developed by google but they are developed by other members in the community so they are kind of like third-party templates but if for some reason you cannot find a template for a tool that you want to install and you cannot find it neither in the template gallery or the built-in template section then you can use a template called custom html you can select this tag right here and then you can just paste javascript right here of course that javascript should be surrounded by these tags because in html when you add javascript it must be surrounded by script tags and that was a quick overview of how to install your first tag with google tag manager by the way if you want to learn more about how to get started with google tech manager i have published a free ebook which is called google tag manager for beginners in that ebook you will find some additional tips that are not mentioned in this video you will find the link to it below the video when you create a tag in google tag manager it does not go live by default to your website visitors so this stack is still not activated on your website to do that you will need to publish your container changes and that way things will go live but before you do that you always have to first test your setup i cannot emphasize this enough but testing tags is super important so after you do some changes always test them before you publish and you can do that by clicking the preview button in the top right corner of your google tag manager interface when you click it a new window or a new tab will open in your browser to improve your testing experience i highly recommend that you install tag assistant companion chrome extension to your browser that's why it is highly recommended that you use google chrome when you work with google tag manager i will post a link to tag assistant companion below this video once you click that link you will see the install button right here click it and then the extension will be installed once you do that then i recommend that you close the tag assistant tab right here you close that window that popped up in your browser and then you will need to click the preview button once again so once you install tag assistant companion then click the preview button once again and then you will need to enter the url of your page where you want to test this setup i am now going to enter the url of my demo website but in your case you should enter the url of your own site and then click connect then in a new tab your website will open and you will see this badge that says tag assistant connected if you cannot see this or maybe it says that the pre-remote hasn't connected then take a look at my blog post below this video where i explain how to fix the preview mode if it is not working ideally you should expect to see the tag assistant connected right here and the connected word right here click continue and here you will see the title of the page where your google tag manager container is loaded and also several events right now we are interested in the container loaded event because when you configure your attack to fire on all pages it means all container loaded events click this event right here and here you will see that in the tags fired section your g4 configuration tag has fired so this is a good start but now we also have to check if this data that was sent by this tag has actually received the destination which is google analytics 4. to do that you should go to google analytics 4 interface and then you should go to configure section right here click it and then go to debug view and here you should see at least one device in my case this is my device and i see several events so the fact that you see this event is a good sign because it means that the configuration tag has successfully sent the page view event and also with that event a session has started now if you want you can click on this page view event and then you will see what kind of parameters were sent together with that event and one of those parameters is page location so you can click on this triangle to expand the page url and here is the page now if i go to another page let's say to subscribe then we will see another page view and you can see that because this is the first page and this is the second page and on that page container loaded event fired once again so once i click it i will see that my configuration tag has fired it has succeeded and then if i go to the debug view google analytics 4 i close this page view window and then i can click on this bubble right here to unpause the stream and here is another pageview event right here and if i click it go to page location this is the location of the second page which is called contact us and this is the exact page url that i am currently on if you have enabled the enhanced measurement feature in your data stream and you can check that by going to the admin then data stream in your property column and then if you click on that web data stream you should check whether this enhanced measurement is enabled and if it is then as you continue to browse your website you will start seeing additional events so let's go back to the home page i can then scroll down a bit and then if i go to the debug view of google analytics 4 so configure then debug view i will see additional events such as scroll and some others please ignore this one because i have created this property some time ago and this event is coming because of some other configuration that i have done in this property so i can see this scroll event because of the enhanced measurement i can click it and then one of the parameters is percent scrolled i can click it to expand and here i can see that i as a visitor have scrolled below the 90 percent threshold of the page height now let's go back to the preview of google tag manager and take a closer look at some features so as i've said here is the page title and on container loaded my google tag manager tag has fired i mean google analytics 4 tag in google tag manager and if i click it i can see what kind of information was sent here you can switch between names and values so for example if i switch to names and if i had some variables used right here i would see variable names and later if you want to see what kind of value did that variable have then you can switch to values since our current setup is very basic we don't have a lot of configuration right here but we still see that this is the measurement id of the data stream to which we are sending data also here we see not only tag details or in other words what was done we also see the trigger information in other words when did this tag fire and when you configured a tag to fire on all pages in technical terms it means that the event name which is right here event equals gtm.js now if i click on another event for example dom ready or window loaded so on window loaded our tag did not fire well that happened because we configured the tag to fire not on all window loaded events but on all container loaded events because all pages trigger is all container loaded events so if i select the window loaded i will see that in the tags fired section no tag has fired and our configuration tag is in the tags not fired section i can click it and i can see that the trigger condition was not met because this all pages trigger was looking for an event that equals gtm.js but if i switch to values the name of the window loaded event in technical terms is called gtm.load since gtm.load is not gtm.js this trigger did not fire also if you want you can click on the page title and see which tags fired at all from this list right here and we see that our configuration tag fired once if we click summary we will see that our tag has fired four times because it fired once on this page then it fired once on this page then on this page and on that first page in total four times now let's go back to that container loaded event click it and then we see not only tags that fired or did not fire we also see the variables later we will take a closer look at some variables but here you can see what kind of variables are now enabled in the container and what was their value for example hostname is this one or in other words the domain of the website and here is the full url of the page this is home page because there's just slash and nothing else but if i go to container loaded event of the previous page we will see that the url of the page is different refer shows the url that was visited before this particular page view then there is a data layer tab but at this stage of your learning process it is too soon to learn this concept because it is too difficult and then there is a tab for errors so if some tag doesn't fire and that tag dispatches an error you might find some information right here when you have google analytics 4 installed on a website google doc manager's preview mode shows not only the information coming from your google tag manager container and all the information that is related to gtm but also you will see some information that is related to google analytics 4 property because this is the measurement id of your ge4 data stream so if you click this one you will see for example in this page view by clicking that some hit was sent and that hit is page view you can click on it and then you can see some technical information what information was sent for example event name is page view there's also another very useful feature and it is important if you're just starting to work with google tag manager and you need some help and something is not working properly so if you are looking for some help you can share the link to this preview mode so that someone else could also take a look at your tags and what is happening in your container so when you enable the preview mode in google doc manager click three dots in the top right corner and then click share then make sure that you have selected not just global site tags but you have selected gtag.js and your google tech manager container when you do that then copy this link right here and send it to a person from whom you want to get some help for example if you are asking for some help in a forum you can copy this link and paste that in the forum thread then another person that clicks this link that person will be able to see this exact view but that person will not be able to do any changes in your container so you're kind of safe in this case if you have way too many events and you want to clear this stream of events you can click this trash icon right here and then you will start fresh so now if i refresh the page again i will start seeing some new data right here as you continue to implement more and more tags and triggers in your container you will start seeing more events right here for example if you click some link and you are tracking clean clicks then you will see link click events right here the same applies to form submissions and some additional events that you will face in the future after you have properly tested your google tag manager setup now it's time to publish your changes so that this tag or maybe other tags that you have in container they would go live for your website visitors or in other words this tag and other tags would start tracking your website visitors to publish the container you should click submit button in the top right corner click it and then you will have to enter version name and version description these two fields are optional but i highly recommend that you enter at least version name because later in the future you will thank yourself for that a version name could be some brief description of what was added or what was changed in this container version because every time you publish your container a new version will be created so in this case we have installed ge4 therefore we can just enter a name like this and then when you have entered it then click publish if multiple people work with google tag manager at your company i would also recommend entering the version description so in this case since we have just one change this version name is enough but if you add let's say 20 30 changes in your container then a version description will be helpful because you could enter something like change to this added that and then in the future when someone will be reviewing the past versions and will be looking for something it will be easier to find a particular version but in this case it is enough for us to have just the version name and then click publish after the version is published you will see a version summary you will see how many tags you have triggers and variables and then if you go to the versions section you will see that you have two versions right now the first one is the empty container this version is created when you create a new container and this is the default version so every time you create a new gtm container the first empty version is automatically published and then we see that the version 2 is the one that is currently live on a website this is the latest version that we are editing in the interface and this is the name of that version so imagine this if you have in the future let's say 50 versions and you notice that something was broken i don't know let's see a week ago so you could go to the versions section right here take a look at what kind of version was published a week ago and then you can click on it to see what kind of changes were made and also if you had some description that description would have been available here as well so let's say that you have a situation that you publish some changes and apparently something in that container broke the website maybe you added some poorly tested custom code that conflicts with your website's source code so in that case what we could do that we should quickly roll back to the previous version that was working for our visitors so you could do that by going to the versions section of the gtm interface and then find the previous version that was working for your website visitors and in general that was stable when you find that version you can click on three dots right here and then click publish then click publish right here and then you will notice that this version is the latest so it means that we are editing this version in the google doc manager interface but it looks like there is a bug at the moment in google tag manager because normally this version which is version one this should be displayed as the live version anyway so when you roll back and when you publish the previous container version to your website visitors then you can freely go back to the workspace and fix your google.magic container to make sure that these new changes are working properly and when you do that you can click the submit button again and let's call this quick fixes and then you can enter what kind of fixes were made and then you click publish again when you do that you will go to the version summary once again and if you click on versions right here you will see that right now version 3 was created and this version is now live so your website visitors are getting this container version and also this is the latest version that we are seeing in our google tag manager interface so what you see right here is that every time you publish a google doc magic container a new version is created and that version is like a checkpoint in a video game so if you mess something up in your current version you can go back to the previous version and then publish it to your website visitors and be sure that nothing is broken on your website while you're fixing the problem with google tech manager you can install not only tools that track your website visitors but also you can add some custom codes that for example add a chat widget for example on my website currently i am running a drift chat and people that come to take a look at my courses they can have a chat with me to learn more about the course so if you want to add this kind of widget on your website you have two options either to add drift code directly to the source code of the website or you can use google tag manager in this video i will not be showing how to sign up for a drift account but i will still show you how to install its code on your website with google tag manager so if i go to my drift account then settings and drift widget one of the options is install if i click it i will select the javascript option because i'm going to add javascript code to the google doc magic container and if i click it i will get this piece of code i will need to copy it and then go to google tag manager here i can click either new tag right here in the overview or go to tags and then click new in the tag configuration i should click anywhere and then i should select the custom html tag because if you do a search in this list you will not find a drift tag template so once you select this tag then paste the code and as you can see this code is surrounded by script right here and right here then i will name this tag i usually name them like this chtml stands for custom html and then the name of the tool for example that i am installing which is drift in this case and then i need to configure when do i want the stack to fire according to drift this should be added to every page where i want to see a drift widget so let's say that i want to install it on every page that is why in google tag manager i should click on triggering and then select all pages click save now we need to test whether this is working properly so click preview and then when the preview mode is connected i should go to my website and i will immediately see the widget appear right here also if i go to the preview mode and click continue loaded because that is the event of all pages i will see that two tags have fired one is g for configuration tag and the other one is custom html tag that fires the drift code so when i make sure that this is working properly then i should go to google tech manager click submit and publish my google tag manager container if you are familiar with event tracking in google analytics 3 you remember that events are tracked with three parameters event category event action and event label well in google analytics 4 the data structure is more flexible therefore these fields are no longer needed when you're tracking events with google analytics 4 you are now in charge of what kind of data are you going to send if for example you're tracking form submissions you can track things like form id form name maybe you have some additional fields and they don't need to be stored as category action or label and later i will show you what i mean when it comes to event tracking in ga4 there are four categories or four types of events the first one is automatically tracked events then there are enhanced measurement events well there are also kind of like automatic track events so if you want you can combine these two types into a single one then you can follow the naming convention of google analytics for and use their recommended events for example for form submissions you can use an event called generate lead and if none of these types cover a certain event that you want to track you can send custom events so these events can be whatever you want if you want to send an event that is called let's say selected option you are free to do so so now let's take a closer look at each event type when it comes to automatic tracked events and website there are several things that google analytics 4 tracks automatically so if a visitor lands on your website for the first time ever it automatically dispatches an event called first session also since a new session starts then an event session start is automatically dispatched as well and then there is user engagement so user engagement is fired when a visitor is engaged for example views more than two pages and there are some additional conditions when it comes to app tracking there are more automatically tracked events and if you want to learn more about that i will post a link to the official documentation of ga4 then the second type of event is enhanced measurement you have already seen the settings of these events and the settings of the data stream and i'm talking about web data stream these events apply only to websites and you can find those settings by going to admin then data streams select web data stream and then enhanced measurement section and as you can see right here all of these features are now enabled if you want to disable some of them because in the future you might notice the need for that then you can click on this gear icon and then disable them one by one and click save right here so when it comes to scrolling this event fires when a visitor scrolls below the 90 threshold outbound clicks event fires when a visitor clicks a link that redirects your visitor to another website or in other words clicks a link that redirects to another domain then there is site search so if your website has a site search and the search information is available in the page url then this event will capture that and if you want to customize this event you should click show advanced settings and then enter the parameter in the url that shows the search query for example on wordpress websites the search query comes after question mark and then s equals and the search term video engagement event tracks embedded youtube videos on your website however there are some situations where this automatic feature isn't capable to solve so in that case you might want to disable that and implement video tracking with google tag manager instead and then there are file downloads so if a visitor clicks a link that opens or downloads let's say a pdf file on your website then this event will fire speaking of support file types that are tracked automatically by ga4 these are the files for example pdf word files text files rich text files csv and so on if you want to go beyond the automatically tracked events and you want to send some additional information that ga4 is not capable of tracking automatically then you want to take a look at the recommended events below this video you will find a link to the official documentation of ga4 where there is a list of all recommended events that you can use for example if a visitor can log in on your website then you can consider using login event and if you click this event right here you will be redirected to a developer documentation where you can see the event name and some additional recommended parameters that you can send together with that event for example if a visitor can log in via email on your website or via google login then a method parameter might be useful so you can send that parameter together with the login event so every time you plan to track new events i would highly recommend that you first check the list of recommended events before you consider tracking custom event names so here we have other events like purchase let's say search sign up when someone registers on your website if you are an ecommerce business there are some additional events such as generate lead add to card and there are also several recommended events for game developers and if after looking at this list you could not find a certain recommended event name then you are free to enter any event name that you want in your google tag manager configuration later i will show you one example of a custom event when you implement event tracking and you start collecting some data that event information will be available in several sections of the ga4 interface for example if you go to reports then engagement and events you will see the report that looks like this this is the list of events that are currently tracked in my google analytics 4 property some of them are test events so you should ignore these two but in general when it comes to naming your events it looks like google is recommending to use the following convention that is also known as snake case which is all lowercase and words are separated with underscores then you can see some metrics for example the event count how many users sent those events the event count per user and so on so if you want to do some quick basic analysis then this report is what you need if you want you can click on that particular event and then you can take a closer look at it you will see things like events in the last 30 minutes then you can see this particular event by country and so on another section where you can use this is the exploration and for example you can click on freeform and then build a report for example instead of city i want to see the event name so here i am going to see what kind of events were made on my website when and in this case i am splitting this based on the device category but since i didn't have any traffic from mobile devices all i see is desktop also the list of all events is available in the configure section and once you go there the first item is events and once you click it you will see a general overview of all events and you can click on any of these events to learn more about this but basically you will be moved to the same section that it was available in the reports section so personally i don't find myself using this part in the configure section very often however there is one thing that you might find useful and that is conversions so if there are certain events that are more important to your business now in ga4 it is fairly easy to mark that particular event as a conversion so if you go to configure and events then you can just click this toggle and that particular event from that particular moment when you enable this it will be treated as a conversion so it means that in certain parts of the interface of ge4 that event will be counted as a more important one a really cool thing about google tag manager is that you can specify when exactly would you like to fire certain tracking codes in previous examples we were using the same trigger which was called all pages and this is pretty much self-explanatory because well this trigger sets the tag to fire on all pages where google tag manager is installed but what if you want to fire a tag only on certain page or maybe under some other condition well that is fairly easy to do with google tag manager so let's say that on our website people can buy a certain product and when they do that they are redirected to a thank you page or in other words order confirmation page and on my demo website you are looking exactly at that page so let's say that we are running google ads for our business and we want to measure the success of our campaigns we want to know which campaigns perform better and which ones are doing poorly so that we could maybe disable them in the future so to do that we would need to have a more precise trigger because all pages in this case would not work we want to send data to google ads about a successful purchase only on this thank you page and we can do that by creating a more precise trigger so let's go to google tag manager triggers then new trigger configuration and then let's say page view so when a page loads we want to fire our google ads conversion tag and we will later in this video create that tag but we don't want to fire on all pages we want to fire only on some page views and when we select this option we get several variables right here one of them is page path the other one is page url so we could use one of them in order to make this trigger more precise but right now we are not sure which one should we use so let's take a look what can we do so i will close this trigger creation window and then i will click preview button then google. magic preview mode will open and instead of home page i will paste the url of our thank you page and we'll click connect now i am on my thank you page tag assistant has connected or at least it is trying to connect and now it has connected successfully so once this is done we could go back to the preview mode of google doc manager click on container loaded because this is the event on which we plan to fire our tag so i click it and then i go to variables and let's scroll down and see what kind of variables do we have page host name well from this value we cannot tell that this is home page or thank you page or something else well looking at the page path this is more meaningful because this says that the url contains slash pages slash payment successful payment url is also an option so this is the entire url that is displayed right here and part of that variable contains purchase successful so in this case it doesn't really matter we can use page path or we can use page url they will both bring the same result well just for demonstration purposes let's say that i will be using page url so let's go to google tag manager triggers and create a new trigger by clicking this new button then i will click anywhere on trigger configuration page view then some page views and then i will select page url now i need to specify this filter page url contains and then this part which is slash pages slash purchase successful i will copy it and then i will paste it right here so if a page view occurs and the page url contains this part it means that we are currently on a order confirmation page so we could use that as a triggering condition now let's name this trigger i usually name it like that page view and then let's say purchase successful and then click save now it's time for us to create a tag let's go to tags and as i've said earlier we are going to create a google ads tag click new click tag configuration and then select google ads conversion tracking in this video i presume that you have at least some basic knowledge of what google ads in general is and i presume that you already have a google ads account so i will not be diving into that part and basically when you log into that account you create a conversion in google ads interface and then you get two values which is conversion id and conversion label now for sake of demonstration i will just enter some gibberish but basically you would need to get this information from your google ads account and then in the conversion label field there will be some other value then in the triggering click anywhere and select the trigger that we have just created which is page view purchase successful now let's name this tag i usually name it g ads and then let's say purchase click save by the way in this lesson i'm going to ignore this warning but if you're actually working on a project you should click this create button and then create another tag without any modifications at least that's how it usually works and then just create this tag but now i'm going to create a google ads conversion tracking tag without the conversion linker click save oh actually this should be just a number so something like that click save and now let's test if this is working properly so click preview this will refresh the preview mode and on our purchase successful page we will see that the tag assistant has connected and on container loaded we have three tags fired g4 configuration tag because it fires on all pages drift is also firing on all pages and google ads tag is firing because the page url contains purchase successful you can click on this tag and you can see what kind of information was configured in this tag we can see the conversion id conversion label and also in the firing trigger conditions we see that two conditions were met one means page view and the other one is page url so this is the current value that is available on container loaded event and we are looking for contains and this so since this contains this the trigger has successfully fired and it is marked with a green check mark if for example i go to window loaded and click on google ads tag you will see that condition was not met even though page url is correct because it is marked with green check mark the event name is incorrect because we're looking for gtm.js which is page view but we are getting gtm.load which is window loaded also there are some additional options how you can check your google ads setup for example you can install a google tag assistant legacy extension you can enable it on your thank you page then reload and see if google ads conversion tracking is marked as green so it means that the request was sent to google and then after several hours maybe the next day you should start or at least you should expect to start seeing some conversions in your google ads reports as well of course if you're actually getting some conversions from your website and if those people before the conversion if they click your ads so when you make sure that everything is working properly and everything is tested don't forget to publish your changes and you can do that by clicking the submit button and then completing all the steps that gtm asks you to complete when it comes to triggers in google tag manager there are more different trigger types that you can use not only page view if you go to triggers and then click new and trigger configuration you will see other event types for example when someone clicks on a link when someone clicks on any element on a page when an element appears on the screen when the form is submitted when a visitor scrolls below certain threshold that you configure when a visitor watches or interact with your embedded youtube video player then we have a bunch of other events as well so if you have time feel free to play around with these options and see how they work let's take a look at how can we track an event with google analytics 4 and that event is not based on a page view but on some other interaction for example a link click here on my demo website i have a menu bar and let's say that i want to track the clicks on these links i want to understand which menu items are the most important to my visitors so what could i do here is first enable the preview mode of google tag manager and you already know how to do that so if you haven't done that yet then you should click the preview button and then enter the url of your website and then i will interact with any of these links so for example i will click the first link and the page reloaded this is the same home page actually i can maybe go to catalog and then the url of the page has changed after i click the link the page loaded maybe the same page maybe the new page i can see these right here so every time new page is loaded a new batch of events is available right here and as you can see we have link click on this page and link click on this page i'm seeing link clicks right here because i have already installed google analytics for and together with that i have also enabled enhanced measurement you can check if you have enabled enhanced measurement by going to admin in google analytics then data streams select website data stream and then checking the enhanced measurement status right here and if things like outbound clicks or file downloads is enabled so since these events are enabled link clicks are available in the preview mode now if you don't plan to work with ge4 or maybe you have for some reason disabled enhanced measurement here is what is going to happen so now i will just turn off enhanced measurement and then let's say after 30 seconds or so i will refresh the page once again in fact i will probably first clear the event stream right here and then i will refresh the page so now we see some events from that page and then if i click a link for example catalog you will notice that i don't have any link click events right here this is happening because by default google tag manager does not have link click tracking capabilities enabled we have to do that manually and we can do that by going to google tag manager triggers then new trigger trigger configuration and then just links and right now this will be tracking all link clicks on a page now let's name this trigger let's say all link clicks and then i will click save so when we do that now we should check whether this enabled link click tracking on a website so let's click the preview button because every time you do some changes you have to click the preview button to refresh and load the latest version of the container on your website so now i have refreshed the preview mode and i will click on let's say contact and once i do that i go back to google tag manager and i see the link click right here but if i click this and go to variables you will see that there is nothing useful here about the actual click like what was the link that i clicked what is the text of the link or maybe some additional information so if you want to start seeing some click information in the variable section you have to go to google tag manager variables and then enable click related variables that are built in so you should click configure in the built-in variables section and then click check boxes next to all click variables right here then for a while you will see loading saving so this is normal and when that ends you can refresh the preview mode and see if those variables work click the preview button to refresh the preview mode and now let's click those links in the menu once again so i will click let's say catalog and let's go back to the preview mode to see what do we have now let's click the link click event right here and go to variables and here we will see some additional information about the click like click text which is right here so this is the value then we have click url and i think that these variables are useful because we could send their values to google analytics and later in the reports we could see that most people for example click on the catalog link instead of you know contact us or something like that so now let's start preparing an event tag that is going to send the menu link click to google analytics for we can do that by going to google tag manager tags then new tag configuration and this time we are going to use the ga4 event g4 configuration is used for pageview tracking and for the basic installation of ge4 but if you want to start sending events you need to select ga4 event then here we have to select the configuration tag that we currently already have in the container because this event tag will take certain settings from the configuration tag for example measurement id so in the configuration tag click right here and select your existing g4 configuration tag now the event name as i've said before you need to enter some event name right here because that event name will be later displayed in the reports below this video you will find a link to another documentation of ga4 about enhanced measurement events and here you will see a list of all events that attract for example view search results click page view and so on click as an event name for me is too generic and i would like to be more specific that is why i still use menu link click but when it comes to parameters we can take a look and see some examples for example with the click event google analytics 4 is tracking a parameter called link url since we are interested in tracking link urls right here we could use the same parameter right here so it makes sense to use link url now when it comes to linked text there is another event which is called file download and this one tracks the following parameters and one of them is link text so i could use that one right here so i hope that this makes sense why i'm using these exact parameter names additionally if you have more information about the link you could come up with some other parameter right here let's say menu category or maybe something like that or you know what let's pretend that i have a menu with multiple levels where menus expand there are some additional items that appear and i want to also track the menu category or something like that therefore i enter this parameter right here now what should we enter in the value well the power of google tag manager is that we can use dynamic variables and they can insert automatically particular value about that element with which i as a user interacted so for example when a link is clicked and i want to get linked text i could use a variable called click text so when i click the link catalog that variable will return catalog if i click let's say contact then another link click event will appear and its value will be contact so this is dynamically displayed right here and we could get that dynamic value in our tag so in the link text parameters value we could insert a variable and we can do that by clicking this lego button right here and then select click text the reason why i choose click text is because click text is displayed right here now when it comes to link url we have another variable which is click url and it returns the url that was clicked not the url that is displayed right here but the url of the actual link so i can do that by clicking the button once again and then select click url now when it comes to menu category as i've said we are just making this up and i don't actually have any data about many category so just let's pretend that the many category right here will be named main or something like that but ideally you would need to have some variable about that menu category maybe in a thing called data layer but again i'm going to advance right here so basically let's pretend that this is also some variable and at the moment this variable will return the word main or maybe you know what maybe this should be named not the menu category but let's say menu location because maybe our website has two menus one in the header and one in the footer let's imagine that so instead of main i will add let's say top menu and then if a visitor clicks a menu at the bottom then that variable will return bottom menu or something like that but right now this is just a text now how can you distinguish a variable from a text you can do that by looking at these curly braces so if some word or maybe words are surrounded by double curly braces this means that this is a variable in google tag manager and if there are no curly braces or maybe you're just surrounding it by single braces then this is just a regular text so when it comes to tag configuration for this case this is enough because we're going to send the menu link click event and we're going to send three parameters now in the triggering section we have to come up with some condition where we're going to fire attack only if link click occurs and that link click is on a menu item so let's take a look what can we do here so in the triggering section click anywhere then click plus to create a new trigger or if you want you can update your existing all link clicks trigger that is fine as well in fact this is exactly what i'm going to do so i will open my link clicks trigger but if i click it right here it will select the trigger if i want to edit the trigger i will click this icon right here this will open the editing mode so now instead of all link clicks i will select some link clicks and here i have some options how to make this trigger more precise now let's take a look what can we do about this because right now we don't know which exact variable should we use in order to distinguish that this link came from menu and not from some link in a text or in the content of the website right now i'm going to click several links and to make this more convenient i will be holding the control key on my keyboard since i'm on windows and then i will click this link this link this link this link they open in a new tab and this page is not reloaded so now i should go back to the tag assistant of google tag manager and start looking for a page with a bunch of link click events and here they are these were clicks on the menu item links the first one the second one and you will see that some values are changing for example click text is changing because well i clicked different links and what we are looking right now is that we are looking for a variable that is same on all four link clicks and that variable's value indicates that we are looking at the same link clicks now let me show you what i mean so if i click on the first link i see click classes and here i see site nav link or site nav link main nav link in this case means navigation link now if i click on the second event this value is still the same and on this case value is still the same here again value the same so i could presume that all menu items have this click class now keep in mind that websites are coded in different ways so on my website click classes looks like this on your website click classes might be something else or also it is possible that click classes will have no value at all so this depends on how developer built your website but in my case site nav link or sitemap link main looks like a good option to make my trigger more precise so what could i do that i can go to google tech manager and select that if click classes contains site nav link main without quotation marks and i copy that value and enter right here then it means that this trigger is firing on menu link click so instead of all link clicks i will rename this trigger but say link click menu and then click save now i can select this trigger that is now more precise and it is added right here if in the future you want to remove a trigger you should click this button right here if you want to add more triggers then you can add them by clicking this plus icon and now let's rename this tag i usually do it like that the name of a tool which is ge4 then the type of data that i'm going to send so it's event and then the name of the event menu link click click save now it's time to test everything so click preview to refresh the preview mode when the preview mode is connected then let's go to the website and again i'm holding my control key and i will click on home catalog blog subscribe contact but also i will click on this link on a footer because let's say that this is not a menu link so i want to make sure that on this link click my tag does not fire while on these link clicks the tag fired so i will click right here now let's see what we have and we can do that by going to the preview mode of google tag manager and looking for that page where we had a bunch of link clicks and here it is on the first link click my tag fired if i click on it i can even make sure why it happened because well if i switch to the names i will see that click classes contains site nav link and this condition was met the event name well the technical event name is called link click so it means that the event was link click and then you can ignore this part because this is some technical magic that is not important for beginners then we can click another event another event and as you can see this is still in the tax fired section here is fired here it fired and now on this one it should not fire because i was clicking not on the menu link and once i click this event the tag did not fire well let's take a look why i will click on the tag while having that link click clicked right here and then we see that the event is link click this is also matched but click classes does not contain the value that we are looking for in fact if i switch to values i will see the value of that link and click classes on that link did not contain anything so it's empty and since empty does not contain this the trigger did not fire therefore we have this x so this is a good start because we see that our tag is firing on certain link clicks well actually it looks like i have closed too many windows so i will click that reopen button once again and we are again connected and if you want to make sure that you're actually like really really sending properly data to google analytics 4 always check the debug view as well so let's go back to google analytics 4 configure debug view and then you will see that you have a bunch of events that are called menu link click you can click on this one and you will see the values like link text link url menu location which is top menu and the same will apply to other menu link clicks as well so from this moment within 24 hours you will start seeing menu link click event right here in the events section also in the reports section and i mean the engagement events so that is also available well again after 24 hours or within 24 hours and also you will be able to use that data in the exploration reports as well however again don't forget to publish these changes live because only after you do that this event will start firing to all the visitors of your website but we are not done yet completely because if we go back to the tag settings you will remember that link text and link url are taken from the documentation of enhanced measurement so it means that google analytics will recognize these events and will display them in reports so for example if you go to google analytics 4 and create a new free form exploration and then if you want to start seeing some data about the events for example the link text or link url you will have to add them in the dimensions section of the exploration so you will need to click this plus icon and then you will need to look for parameters or actual dimensions such as link text or link url so since we are sending link text and link url right here they will be recognized and you will be able to see them in the report for example if we have well instead of city we send the event name and also we send the link text and link url and then we filter down to see only those events of which event name contains menu link click then you would see that data right here but again since we haven't waited for 24 hours we cannot see that data right here but in the future you will be able to do that when google analytics has enough time to process that information so link text and link url will be available in your reports and you will be able to use that however when it comes to menu location here's what is going to happen so let's say that i want to also report on menu location because i want to understand how people are interacting with my top menu and with my bottom menu of the website so if i click plus and i enter menu you will not find anything because i came up with that parameter that parameter is not automatically recognized by google analytics 4 interface because that parameter is not available in the documentation so to see that parameter as a dimension you need to register it as a dimension and that can be done by going to configure custom definitions create custom dimensions and then enter the dimension name so in this case you can enter like a label or whatever you want to see in the report so that can be something like menu location this is just a label that is more human readable you can enter here whatever you want but here in the event parameter you must enter it exactly as it is right here so menu underscore location like that if you don't see the parameter as a suggestion don't worry because this is what happens when you start sending a very new data that was not seen by this property before and make sure that the scope of this is event because with every event the value of location of the menu item can be different and now click save so once you do that and we can see our dimension right here from this moment after 24 hours you will start seeing that dimension in your exploration as well so if we open that previously created free form exploration you will be able to add that to your report so click dimensions plus and then here you will be able to see that but again not so fast because i have just created it and after 24 hours i will start seeing that menu location in this list and then i can import it into the analysis if you want to learn more about how in general the freeform exploration works i will post a link below the video to a guide where i explain how to work with it because i understand that this is very confusing for those who are just starting with google analytics for so to sum up if you are sending some parameters that are recognized automatically by google analytics 4 or in other words they are mentioned in the documentation at least in most cases then you don't have to register them as custom dimensions but if you're sending some custom parameter you won't be able to see it in the reports unless you register them as custom dimensions and that can be done by going to configure custom definitions and then create custom dimensions and then obviously enter that information in this field you can enter whatever you want this is as well whatever you want but here you must enter exactly as it is entered right here even if you see the parameter incoming in the debug view it will appear in your regular reports only after you register that custom dimension in ga4 and finally when you properly test your setup don't forget to publish your google tag manager container by clicking submit button and then completing all the other steps awesome you have made till the end of this tutorial now you have a better understanding of what google tag manager is how does it work and how to create your first setup however keep in mind that this is just the beginning of your journey there are still many things that you need to learn about gtm and that's where my full course for beginners takes the spot this video that you're watching right now explained around 10 maybe 15 of what the beginner actually should know about google tag manager the rest 85 percent are explained in my course which is called google tag manager masterclass for beginners i will post a link to the course below the video 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 then 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: 233,578
Rating: undefined out of 5
Keywords: google tag manager, google tag manager tutorial, google tag manage rtutorial 2022, install google tag manager, google tag manager for beginners, google tag manager tutorial 2021, google tag manager course, gtm for beginners, google analytics 4, gtm tutorial, how to use google tag manager, what is google tag manager, google tag manager guide, google tag manager setup, gtm tutorial for beginners, google tag manager explained, install google tag manager on website
Id: u_x5lVJMKZ0
Channel Id: undefined
Length: 93min 28sec (5608 seconds)
Published: Tue Feb 01 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.