YTread Logo
YTread Logo

Google Tag Manager Tutorial for Beginners (2024) with New Google Tag

Mar 27, 2024
If you are a digital marketer or digital analyst and want to implement analytics and marketing tracking codes much faster, for example Google Analytics, then Google Tag Manager is exactly what you need, but how to get started, how to properly create your first setup without wasting too much. It's time to look for the right learning resources in this video. I'll show you that we'll learn how to get started with Google Tag Manager, how to install Google Analytics 4, and more. Google Analytics and Google Tag Manager are constantly changing, so this is probably the third one. version of this

tutorial

on my YouTube channel, but I'm just trying to keep it up to date, but if you notice some major differences between this video and what you see on your screen, take a look at the description of this video.
google tag manager tutorial for beginners 2024 with new google tag
It may have some updates. So what is Google Tag Manager? The best way to explain it is by showing an example. Let's say you're working for a company or maybe it's your client's company and if you have some visibility online, chances are you have a website or maybe. several of them to measure the effectiveness of these websites you would need some analytics tools for example Google Analytics and that is where it joins the game, you need to install Google Analytics on those websites in the old days or we can call it classically. You would need a developer to do the job, in this case the developer is responsible for adding tracking codes to the site, maybe sending some additional data events, etc., but the developer is usually not very familiar with analytics tools, so that asks a lot of questions, for example, when do you want those tracking codes to be triggered, what kind of data do you want to send, do you want to send some event data, when exactly do you want to send it to Google Analytics, so that after a while it sends messages. and sends emails back and forth and finally the developer confirms that he understands the task, so the next step would be for a developer to implement those tracking codes, but it usually takes a long time because developers have other priorities and, In most cases, analysis is not enough. your top priority, so you can wait days and weeks for those tracking codes to be added and that's where Google tech matching becomes very useful because it allows you in many cases to speed up the process and manage those tracking codes yourself , this is how Google Tag Manager works.
google tag manager tutorial for beginners 2024 with new google tag

More Interesting Facts About,

google tag manager tutorial for beginners 2024 with new google tag...

Simply put, you have a website and your developer installs Google Tag Manager on a site and then you manage your tracking codes within Google Technical Manager, so basically when you activate GTM on a site, you also activates your tracking codes, of course, according to the conditions that you define in Google tech

manager

speaking of benefits Google Tech Matcher has many of them, first of all, all your tracking codes are stored in one place, so it is easier to find them, manage them and decide when to activate them. Of course then you depend less on developers, this does not mean that Google Tag Manager will replace developers completely because in some cases developers will still be needed, but there will be many more situations where you will be able to add tracking codes yourself and do it. much faster, that's why the third benefit is speed.
google tag manager tutorial for beginners 2024 with new google tag
Additionally, Google Tag Manager is very popular and continues to grow. This means that there are various learning resources in different formats, such as blog post documentation videos, there are also various forums and communities, so if you get stuck. Somewhere, there's a good chance you can get help pretty quickly, but before we continue, I wanted to give you a quick disclaimer. This Google Tag Manager learning journey will get confusing at some point and that's okay, don't worry. Some topics are more technical but they are necessary for you to learn, so at the beginning of your journey you will have no idea what you are doing, but then I will start showing you some things and you will try to repeat them after me.
google tag manager tutorial for beginners 2024 with new google tag
To understand how this works and you will eventually be like Neo, who began to believe in his powers and then was able to solve various challenges quite easily. To get started with Google Tag Manager, go to tag

manager

.

google

.com or simply enter Search Google for Google Technology Manager and the first link will probably be the one that opens GTM. If you've never worked with Google Tag Manager before you'll see something like this where you'll be asked to create a new account, but if you already have at least one account and a container then you might see something like this, so Now I'll click on create account and here are two key components: accounts and containers.
The account is basically a business, so if you work as a business and you have multiple websites, you need to have one account and then in that account you can have multiple containers. Containers are like repositories where you store your tracking codes. You can have separate containers for each website or you can even have one container for multiple websites if that makes sense in your context. so here let's say I'm going to call this Mania GTM fundamentals analysis or something like that and then in the container settings I'm going to call it, let's say demo container and in this mini course I'm going to focus on website tracking, that's why our Target platform on the web, click here and then click create, then you will need to accept the terms of service and now you have created the container.
If you prefer charts or visual explanations, let's take a look at this again when you want to access Google Tag Manager. You have a Google account, this is your Gmail account that you also use to access things like Google Analytics, Google Ads, and other Google products. Then when you have it you can create Google Tag Manager accounts like I said a GTM account is for a business than a business and then within each account you can have one or more containers if the business has multiple websites For example, you have a blog, you have a main website and your structures are very different and the tracking codes that you are going to use are quite different. than I would recommend creating separate containers for each website.
This is the Google Technical Manager interface on the left sidebar. You'll be able to access your tags' triggers and variables later. I will explain what they are and what they are for. When you want to create, let's say a new tag, you'll need to go to Tags, then click New and follow the process. You can also organize your tag triggers and variables into folders, for example you can have all your Google Analytics tags in one folder and then let's say Google Ads tags in other folders etc., templates are another topic complex basically you can import certain templates from the gallery powered by the community of web analytics specialists, so for example in the tag templates section you can click on browse the gallery and here.
There are a lot of different templates that you can use, for example, if you want to install the Facebook pixel, you can go to Facebook and here you will find several options in the top menu. We have a workspace where you will spend most of your time because that is where you manage tags, triggers and variables, then there are versions, so every time you publish your changes to the container you will create a new version. The nice thing about versions is that you will then see a list of all previously published versions and, for example, if you release a new version of your container today and something goes wrong, maybe something doesn't work, then you can quickly go back to the version above that was working and then as long as your mind is clear and there are no additional problems. you can fix the issues and release another new version of

google

tag manager container.
You can publish the previous versions by choosing that previous version and then going here, clicking on Three Dots and clicking publish, then there is the administration section where you can manage things like like user access at the account level or you can manage users at the account level. of container, you can also change some settings in the container itself, but there are not many changes here, mainly the name of the container and some things related to advanced consent, then here you can access your Google. tag the subject tracking code once again, you can also export the container, for example, if you have the same configuration that you want to apply in a different container, then you can export this container, go to that other container, click import and import the file from that container, which is also quite useful and there are some other options here, but they are outside the scope of this lesson because they go a little beyond the beginner level.
Let's go back to the workspace, so here in the workspace, when you make some changes, they will be visible. here and before publishing them you will need to test them and this is highly recommended, so to do this you will need to click on preview, this will open the preview mode and then we will use it and this will help you test your changes. but only within the limits of your browser, which means that untested changes will not yet be published to your visitors until you tell them to and once you make sure everything is working well, you can finally click submit and publish a new version, which means that all of these recent changes will be applied to your website visitors and there is also one more place where you can make your Google tag match your container code by clicking on the container ID right here and you will get these codes very soon.
I'll show you what to do with this code, but as for the interface overview which is the Google Tag Manager external container, the next step is to install it on your website. There are mainly two ways to do it and they depend on the type of content management system. that you use on your website, the first option is to click on this container ID and then give these two codes to your website developer. The first code needs to be added to the header of the website and this code is required for Google Tag Manager to work. the second code needs to be added to the body of the website code, the developer will know what these two are.
The second code is optional, you don't need to install it, but if you're interested in things like checking Google Search Console properties with the Google tag. administrator, then this code will be useful to make the process for the developer look like this. He or she should copy this code and then go to the source code of the website and add it to the header. It's perfectly fine to add this code before. the closing header tab tag is the one with this slash here, but if your content management system does not allow you to edit the header of the website and only allows you to edit the body, then Google Tag Manager It will also work if this code is added.
Somewhere in the body now when it comes to the second code it is highly recommended that if you decide to add it to your website that it be added right after the opening body tag so here we see the body and then the code should be placed immediately. After that, once the developer saves these changes, Google Tag Manager will be installed on your website; However, if you're working with a popular content management system, there's a good chance that system already has built-in support for Google Tag Manager. or maybe there are some plugins that you could add to the website and that plugin will help you install Google Tag Manager faster, for example, if you are working with WordPress, there is a very popular plugin called Google Manager for WordPress, so that once you install that plugin it will appear in WordPress settings and then click on Google tag manager here, it would be enough to just add the container ID so you can get the container ID from this tracking code right here, so once you copy it and paste it here and then in this case select codeless injection and save the changes.
This will install Google Tag Manager, but remember again that the installation process will be different on other content management systems, so you'll need to make adjustments once the developer tells you that the Google Tag Manager container snippet Google. is installed on the website, you need to check if it was done correctly. The easiest way to do this would be to go to the Google Tag Manager interface, click Preview, then enter the URL of the website where Google Tag Manager is installed.Google and click connect if you see that tag assistant is connected here and here then it means Google tag manager has been installed successfully.
In my case, the preview mode of Google tag manager opened in a separate browser tab, but in your case it could open in a new window personally, I think it is much more convenient if the preview mode opens in a new tab, so I would recommend that you install a tag assistant add-on extension. I'll post a link below the video. It is available on all Chrome based browsers for example Google Chrome and once you install it the website where you are debugging your GTM setup will start opening in a new tab if that extension for some reason is not working then There is another extension called Google tag assistant Legacy.
I will post a link below also the video, oh and one last thing I forgot to mention is that the developer should add this google tag manager code to every page of their website because then google tag matching will work only on those sites where this container fragment is added if you or your developer add it only to the home page. Google tag manager will work only on the home page. External tag triggers and variables. Tags are code snippets that you add to Google Tag Manager and then based on your conditions, those tags will be activated.
Tags can track. codes, they can be codes that change the color of the button, they can be other codes, so basically it's a piece of code that you add to your website and then you have to decide when you want those tags to activate, that's where the triggers, so The trigger is a set of conditions that must be met and then if that happens the tag that is linked to a trigger is activated and then the third component is the variables and whenI was learning Google Tag Manager. The relationship between tags and triggers was clear to me, but I didn't fully understand what kind of role variables play here, so let me explain it a little differently when teaching the concept of trigger tags and variables.
I usually like to do that with three questions, the first question is what do you want to do, for example if you want to track a button click you need to trigger some code so that code is a tag, if you want to track a Track your purchase. a tag, then the next question is when do you want to do that and when do you want to activate the tag. Your example could be when a user makes a purchase or when a user submits a form or something, so the answer to when is the trigger and the third set of questions is what, when or how exactly and that's where they are needed variables because when you say you want to activate a label on the order confirmation page you need to be more specific, how can you specify the thank you page?
Well, with the page URL, so if the page URL contains, let's say thank you for purchasing the page URL, in this case it's a variable, let me show you an example, let's start with what a tag is, in In this case a tag could be a Google Ads Conversion Tag because what will this tag do? It will track a conversion. When will you make that label? This will be done when a visitor reaches a thank you page or also known as an order confirmation page and then when exactly or what exactly or how exactly, in this case the when exactly would be when the URL of the page contains a successful purchase, so the URL of the page in this case is the variable, but also with that conversion tag we could send the total value of the order, how much money the visitor spent on our site with that purchase, so another variable could be the order total because it contains a monetary value of the purchase.
Let me visualize this with the previous explanation where we had triggers and tax variables. Now let's replace these words with the real example. We have the Google Ads Conversion Tag that will trigger as a thank you. page, but Google tag manager is not human, it is a system, so you need to be more specific. What does a thank you page mean? It basically means that the page URL must contain a successful purchase, so the page URL in this case is the variable we use. in the trigger and then along with the Google Ads conversion tag, we want to send the order total, so that's another variable.
If this still sounds confusing, don't worry, we'll soon be using those variables in action and then you should start to understand this concept better. Google Analytics is a platform that allows you to measure how visitors interact with your site or how users use your mobile application. In this mini course we will focus on website tracking, so very soon I will show you how to install Google Analytics on a slide with Google Tag Manager, but now let's take a quick look at Google Analytics 4 and what it can do by you so once Google Analytics 4 is installed you will start getting some data on user behavior for example if you go to reports then I will see a bunch of different reports here in your case the list Reporting may look different depending on the type of settings you choose in Google Analytics, but in my case I have these reports, for example, if I want to see where my visitors are. from then on I could go to acquisition and traffic acquisition and here I can see channel groups but many people prefer to use the session source medium so here you can see that for example a lot of traffic comes from Google search and also come from Paid Advertising, some things are not tracked properly because Google Analytics is not installed properly on this demo account, but you can still see what kind of data you can get.
You can also see a layer if you additionally implement eCommerce tracking and then you can see how. How much revenue did you get from each traffic source? So Google Analytics can also track things like page views and that's done automatically, so here we see what kind of pages are the most popular, how many page views they got, how many users viewed them. Pages can also switch between dimensions and for example change the page path etc. A very important component of Google Analytics is event tracking, when something happens on your site, for example a visitor submits a form, you can send that form submit event to Google. and analytics and that's where other reports such as events can start to fill in data, for example here a lot of people saw some internal promotion, maybe a banner on a website, then we see the page view count etc. , and if you are selling something on your website and you track it with Google Analytics and then the monetization reports will show you some additional data, for example, eCommerce purchases.
Here we see the top products, but number one is tracking incorrectly, so that's another problem with this property, but here you can see. that this product, for example, has been viewed so many times, then add to cart probably, unfortunately, did not work correctly. I mean, tracking didn't work and then this is how much revenue we got from that particular product, we can also sort if you want. and these are the best products based on item revenue, then there are more advanced reports where you can explore the data that you have that is available in the scans, although we have a ton of options here personally.
I most often use these three which are freeform funnel exploration and path exploration, so freeform exploration is basically like a table where you can visualize data, of course there are some graphs but I mainly use it for tables, then the funnel exploration where you can define the journey of a particular user and then you can see how people abandon at which step and then you can also use the path in your explorations to see how people navigate between different pages or in what order particular events happen, so if you click on the freeform explore here we have an example where you see the main configurations divided into device categories and how many users we have in each combination.
Then we can look at another example which is the funnel scan, so I'm going to click blank here. I'll select, let's say, final scan and here I can create an event sequence by editing the steps, so I click on the pencil and let's say I want to see how many people viewed the item, so there is an event view item that gigonometers doesn't track automatically. 4. You have to submit this event specifically with the help of developers. or with Google technical manager the next step could be add to cart then the next step could be start checking out and then the final step could be buy now if I click apply and maybe I can select a longer time period long here.
I'll see. A lot of people see at least one product, but 99 of them don't go to the next step, which is adding a product to the cart, but I can expand it by scrolling up or using these icons here and then I can see it. of those who added product to a card, 58 did not start a checking account, so we also see some completion rates here and again. This is just a very brief overview of Google Analytics and I won't delve into what you can do with this. data because that's not the purpose of this mini course and then the final example could be route exploration where you can see how people navigate and in what order on your website, so I'll start over and then select the starting point , which is the page path and that page path is this, so this is a landing page and although again, this is not tracked correctly because Google Analytics is not very well installed in that demo store, the second most popular page is the login page, so I can click on it. and see what other pages visitors usually visit after that, so we have store.
I can click here and I can branch out and see the most popular paths that my visitors take. Another interesting thing is that I can start over and start from the end. point, for example, I can choose the order confirmation page and then I can go back and see what my visitors visited or what they were doing before making a purchase, so if you click here and then select, let's say, the page path and enter the page path. from your order confirmation page, you can do the reverse route, so in the next part I will explain how to install Google Analytics 4 with Google Tech Manager Foreign.
Let's create our first tag if you don't have a Google Analytics property yet 4. then go to Analytics.google.com and if you are completely new to Google Analytics you might see a view similar to this so here you will need to enter the name of your company and then click Next, but if you already have at least one. you have analytics for the property, then you will need to log in to any of those properties and then go to admin and then click create account here, let's say I'll go into the Analytics Mania demo, then I'll click next and the next step is to create a property that is like a repository where you will store data about your website or your mobile apps, so I will also name this demo Analytics Mania.
You can enter here, let's say the name of the website, for example, make sure you select the correct report. time zone of your company, your currency and click Next, then you will need to answer several questions, click Next and just to speed up the learning process for now, select this option here because then you will get a set of standard reports that exist in Google. Analytics 4 for a while, but in the future, if you want, you can select other options because depending on your choices here, you will see a different set of reports in the left sidebar of Google Analytics, so now let's choose Benchmark Reports, let's do Click Create and then accept. with terms of service and you will now be prompted to start collecting data.
Data collection in Google Analytics 4 starts with data streams. These are the ways you can send data to ge4. If you are working with the website, you will need to select web. If you plan to send data from mobile apps, you'll need to select these other data flow types right now. Let's select web. Here you can enter the URL of the website. In my case, I will go to my demo website and my paid Google Analytics. Google Tag Manager courses, my students have access to demo sites where they can practice in action working with GTM and ga4 and here I can enter something like my website, this works fine, so the next thing Google Analytics asks you to check It's automatic.event tracking because ge4 tracks not only page views but can also track some additional events for example site search video engagement which is the built in video player and I mean video player from YouTube on file downloads from your site, etc.
I personally never found form interactions useful because they cause a lot of false positives, that's why I will click the gear icon, disable form interactions, click save and then create the stream. Now Google Analytics will ask you to install the code, but we'll use the google.com buffer so we don't. There's no need to close this with the full code, and by the way, we'll just need the measurement ID. If you are completely new to Google Analytics 4. I have a one hour

tutorial

on it where I go into more detail, so if you want to check it out.
Then I will post a link below the video, so now what we need to do is copy this measurement ID, so click on this icon and now let's go to Google Tag Manager tags, click on New Google Tag Settings Analytics and then select Google Tag here we have to paste the measurement ID, then click Activate and select Initialize all pages. You may find some older tutorials that tell you to activate all pages and that will work fine too, but the current recommendation is to use initialization, then let's name this tag and click Save. now we have created our first tag in google tag manager.
When you make some changes to the container, don't hit submit right away. First you need to test if those changes work correctly, so now we need to check if Google Analytics 4 is activated. a site successfully so click preview then enter the URL of the page where you want to try this and click connect once you see the tag wizard has connected go back to the tag wizard tab and here click on the container loaded when we set the tag to activate. on all pages means all events loaded from the container and here we see that in the activated text section our G4 tag has been activated successfully, so that's a good start.
Now let's check if Google Analytics has received that data, so go to ga4 and then admin and then keep looking for the debug view here, you should see your events if you don't see them already, then wait a moment because for new properties the view Debug takes a little longer to start working but in my case here I have the page view I can click on it and I see the parameters that were sent along with that page view. I can also expand those parameters for example the location of the page and I see the URL of the page where that event occurred and this is the same URL that is visible in the address bar of the browser so everything looks good now let's take a look very quick look at the preview mode, here on the left side you will see the event stream from google tech manager, these are not google analytics events, this is related to google tag manager and if for example, there were some clicks or some purchases and that data is sent to the thing called Data Layer, which is a little more complex topic, then you would see those interactions in the left sidebar and you could use them as other conditions to trigger your tags later .
We will show you one of the examples. If you have multiple containers installed on the same site, you may find the container IDs here, but we're working with this one right now; when you are debugging tags you can click on the event on the left side where your attack was supposed to fire and then you can click on the tag itself and this will help you troubleshoot, for example maybe the tag is not fired when it was supposed to or vice versa, so in this case we see that the tag was fired and we see the trigger condition that caused this trigger to fire and then the tag was fired, you can switch between values ​​and names because these little ones blocks here show the variables in google tag manager, so overall the google tag manager preview mode should become one of your best friends when it comes to tag management because it will help you fix several situations if your labels don't behave the way you want, we'll also take a look at the variables and data layer tab soon, but for now let's keep it as is if for some reason you start working with your configuration and don't you know what is wrong and If you need help, then it is a very good practice to ask for help, but when you do, also share the link to your preview mode with other people so you can do it by clicking on these three dots, then click on share and then make sure you are debugging.
Google Tags and your Google Tag Manager container and then enter the URL of the page where you are testing this. Once everyone is selected, copy this URL and share it with someone else who is willing to help you. This will definitely increase the speed of troubleshooting and you will get help faster when you make sure that your configuration is working well and your changes are working correctly, then the next step is to publish these changes so that your new configuration is also available to visitors from the website and to do that you have to click submit and here a good practice would be to add a quick version name because if you skip this step and after a year you come back to the container with a bunch of versions without names, you will have a hard time finding when what change was implemented so I would suggest to enter at least the version name if you add some description which is even better in our case we can enter GE for installed and then click publish now version 2 of the container has been published and is available for Website visitors can always find the list of all Container versions in the versions section in the top menu if for some reason let's say this new version contains some bug and maybe you have misconfigured some tags and need quickly go back to the previous version, you can do this by clicking three dots on the previous version and then click publish and then click publish again.
Now it will show you that this version is live and the error is no longer loading on your site and now you can continue working on your container you can fix the problems and once you are ready and let's say you know that everything is configured correctly, now everything is fixed , you can submit a new version, so let's say we will call this solution ga4 or something like that and click publish and Now this will create a third version that is active and that is the most recent, so the latest means that you are working with that version at the moment and with your Google Technical Manager workspace, so this type of process needs to be repeated every time you make some changes in Google.
Tag Manager, you first implement those changes, create tags that trigger variables, then preview them with Google Tag Manager's preview mode, and if possible use things like debug view for Google Analytics or maybe you are using some other tool that has something real. Time debugging functions and once everything has been tested correctly, submit a new version of the external manager. You can choose from a bunch of different label templates, which is why they are called label templates. We have analytics, 4 Google Ads, etc. as well if you scroll down. See many others, but what if you want to install code that isn't listed here?
In that case you have two options: The first option is to try to find a custom template, that's where the templates section can come in handy, so go ahead. to templates then search the gallery and then use this search feature to find the tool you want to install for example in my case let's say I want to install a chat widget and that chat is created by drift if you have a drift account and I want to find the instructions that tell you to add this type of code to the website, so what I would try to do first is go to the Google stack manager and enter Drift.
But this talks about drift pixels, not drift chat, so I'm not sure. If this stack template works for me, that's why I would try using a different alternative, which is a custom HTML tag, so go to tags, click new tag settings, and then choose custom HTML. Here you can paste the JavaScript code for a particular platform. what you want to install asks you to add, so in my case I will copy this bypass code and paste it here when you do. The next part is to configure the trigger, when do we want this chat to activate? if you want to install it. on all pages normally you can use the all pages trigger because in most cases that would work, so I'm going to select this trigger and then name the tag.
I usually call them like this, chtml means custom HTML and then I'll add it like this. click save and test if this works. I'll click on the preview, then I'll click on continue and go to the page and here I can already see that my chat widget has appeared and I can send the message here. Also, the tag is activated right here, so if you can't find a custom template or a standard template then use custom HTML, now talking about other templates, I mean custom templates that you may find useful here are several examples, for For example, if you want to install Facebook pixel, you can go to Facebook and then use For example, this Facebook pixel template can be applied the same to, for example, LinkedIn, so there are many templates available there and you can use one of them, so let me quickly show you an example of the Facebook pixel, so I click on that template and add it. to the workspace and I click add so now the template has been added so now I need to go to tags click new tag settings and then choose custom template right here and as you can see instead Trying with the simple code, I see some fields falling below the radio buttons here.
I paste my Facebook Pixel ID into some additional settings and then for a tag whenever I'd like, and of course, as always, once you test the tags you've added to your container, don't forget to post them to the external tracking. In Google Analytics 4 there are several types of them, the first is an automatic event tracking, for example, when a visitor first arrives at your website. Google Analytics 4 will track a first visit event and there are several others such as login or user. commitment, there is a set of functions that can track various other events automatically and that set of functions is called enhanced measurement.
You can learn more about enhanced measurement by going to Google Analytics, then Admin, then Data Flows, and then clicking on the website data flow here. You will see the improved measurement section and here you can see what type of events you can track. You can also click this gear icon to view other events. There is a fairly high probability that more events will be added in the future and if you want, you can do so. disable some of them or keep them enabled, so now let's take a look at how some of these events work. I'll go to Google Technical Manager, click preview, then click connect, and then I'll go to the Google Analytics debug view just to show you. several events, so here I have an example of clicking an outbound link.
Let me click on this is a link that redirects the visitor from this domain to another domain and if I go to the Google Analytics 4 debug view, I will see an event called click and I can see the URL of the link. This is the URL of the link that was also clicked on one of the pages. I scrolled below 90 of the page height. That's why we also see the scroll event. I can click on it and here we also have the scroll percentage. Google Analytics can track links that download or open certain files, for example PDF files, so I can click here, this will download the file and then I can go to the debug view and one of the events is the file download.
I can click on it and I can see. Depending on the URL of the link, what type of link, and what type of file it was, the next group of events is called recommended events, so Google Analytics 4 doesn't track them automatically, but you can submit that data with Google Technical Manager or with the help of your developer to ga4 below this video I will post a link to a documentation on recommended events and here you will see a list of them. You can also, for example, click on any of them to get more information about what kind of parameters you can send with them. together, for example, if someoneregisters on your site, Google Analytics recommends sending a registration event, you can click and here it will show you a recommended parameter which is not required but if you want you can send it, for example this method parameter can mean the way that the user signed up was with the email address, maybe with the Google account, maybe with some other account, so when it comes to recommended events, most of them are really recommended, I mean, not are required, so you can name the log event log. that will work fine instead;
However, when it comes to eCommerce tracking event names, such as purchase, refund, or add to cart, they should be named exactly like that, and in general, I strongly recommend that you follow the Google Analytics naming convention 4. What It means that event names should be all lowercase and instead of spaces they should have underscores like here for example, so if you have something you want to track with Google Analytics, it's always good practice to check the list of recommended events and then if you find something use it but if you can't find it there is a fourth group of events which is called custom events this means you can send any event name you want and you can also include parameters which could be recommended parameters. or you can create some custom parameters after sending the events to Google Analytics 4, then they will be available in various sections of the interface, for example, engagement reports and then events, just keep in mind that when you send data to Google Analytics, it will take up to 48 hours for this data to appear in the reports.
So, since we've had our introduction to event tracking, let's track our first event with Google Tag Manager. When it comes to event tracking, you need to understand how triggers work, so take a look, go to triggers in Google Tag Manager and then click on New Click Trigger Settings and here you will see a Lots of trigger types supported. The first five are related to different stages of the page loading process, for example, the page view is the time when the Google Admin tag starts loading while the window is loading, which means that all resources of the page have been loaded including scripts and images then we have click triggers so only links crawl only links and if you want to crawl some element which is not a link but still clickable. then you may want to use the all elements trigger and if you want to keep track of when a particular element appears on the screen, for example a success message, then you may want to use the element visibility trigger , then there is a form submit trigger but it is mostly unusable because it fires too often or in some forms it doesn't fire at all, so I would say in 99 of the cases you won't be able to use this and There are other forms tracking methods, so if you want to track when someone, for example, scrolls below 90 or 50 of the page height, then scroll depth is the trigger you could use.
If you have a built-in YouTube video player, you could use this trigger, and if you have a situation where none of those triggers work, you could ask a developer to add it. some custom event to something called Data Layer and then you could use that custom event with this particular trigger, changing history is useful when the page url changes without the page reloading so you could track it then The JavaScript error is self explanatory, so if some JavaScript error occurs on a page, you can send it as an event to Google Analytics and then the timer, so this applies to a page, so that if a visitor stays on a page for, say, 50 seconds, 10 seconds or so, they could use this trigger and there.
It is also a group of triggers which is useful if you want to combine multiple conditions, for example if a visitor scrolls on a page below 50 of the page height and also stays on that same page for more than 30 seconds, for which can combine two activators into one. trigger group and only when all the triggers in the trigger group are activated then its tag will be activated. In this tutorial we will look at the link click trigger as an example, so although Google Tag Manager offers this variety of triggers, they are not enabled by default. so you need to create a trigger to enable that tracking functionality, for example if you want to start tracking link clicks you need to create a fair link trigger so let's do that let's choose fair link clicks and then I will name this , for example, all links. clicks because for now we are just going to see what is happening in preview mode and then I will click save now let's see what will happen on the website so click preview to update the preview mode every time you make a change in your container and you want to test this, click on the preview mode and on the GTM interface, so now I'm on a page and I can click on this link or this link or this link.
I was holding down the control key on my keyboard so the page wouldn't reload and here we see a ton of clicks, so even though I click three times, I see six link clicks. This is a bit confusing for

beginners

, so this happens because three triggers come from Google Tag Manager and since we have created a link click trigger, we enable it. link click tracking capabilities, so we're starting to see some link clicks here, the other three link clicks occur because enhanced measurement is enabled in Google Analytics 4. This can be a little confusing, but overall up now nothing was sent to Google Analytics because no The tag was fired here so far so good.
Now let's take a look at what kind of information we have about those link clicks, for example, maybe we can retrieve the text of a link or the URL of that link and then when we select one of these link clicks. We could go to variables and unfortunately we don't have anything related to clicks, but if we go to the data layer we will see things like the link URL for For example, if I click here, I will see a different link URL. There is also text for that link, so it seems that Google's tag manager is able to retrieve information about the link, but it is not available as variables and this is crucial for us to data.
It was available as variables because otherwise we won't be able to use it in triggers and labels. So what can we do to solve this problem? We would have to go to Google Tag Manager Variables and enable a bunch of Google Click variables. tag manager because google tags generally support click tracking so it has click triggers but we also need to create click variables so in the built in variables section click on configure and then scroll down to enable all the click variables once I do that, let's click preview and refresh the page, let's do the same thing again, so I'm going to click this link, then I'm going to click this one, I'm going to close these tabs and I'm going to go to mode preview.
Now let's click on the first link click event and go to variables and that's it. we have things like click classes, click text, click url, some variables are empty because in my case those links don't have click id but in other websites they may have it, also in some websites click classes may be empty, but generally it looks like this it would work fine, but now you might be wondering: okay, so I enabled link click tracking, how can I send the data about that link click to Google Analytics and that's what we'll learn now? Let's say we want to track clicks on menu links.
So whenever someone collects any of these links in the menu bar, I want to send it as an event to Google Analytics. So far we have created a link click trigger, it would trigger on any link click, so if you just link this trigger to Google Analytics. for the tag that would fire on every link click and I don't want to send an event to Google Analytics 4 only when these links are clicked, so let's take a look at how we can limit our trigger to only these link clicks. so I'll click this one, this one, this one and then we'll see what happens or actually maybe I should delete the stream right here and try the same thing one more time so I'll click this link, this one and this one, let's go to preview mode and click on the first link and go to variables, then click on this link for example, and this one, and let's try to find some similarities between those links, what type of variable remains the same in the three links.
Clicks in my case, i.e. click classes, all contain the site. main navigation link, meaning this is the main navigation bar. Please note that each website may be coded differently, so in your case the click classes may be empty or may contain different values, so you will need to adapt, but in my example, all the menu links. clicks contains the same class which is what I could use in my trigger so let's go to Google tag manager and edit our existing link click trigger click on the pencil and then click on some link clicks and now we can limit this trigger with variables. to trigger on all link clicks I want my tags to trigger only on some link clicks where the click classes contain and then this part here like this and then I'll rename this trigger so we say link click menu and then Click save to be done. with the activation part, but now we need to send that data somehow and that's where tags are always used.
Let's go to the tags, click on the new Google Analytics tag settings and select the ga4 event when you want to use only basic Google analytics for the configuration, which means page views. and maybe some automatically tracked events, then it is enough to have just one google tag, but if you want to send some additional events with google technical manager, for those events you have to use event tag, so click on it and then you can paste the measurement ID. Google Tag Manager will scan the container and we will look for Google tags that have the same measurement ID;
However, you should keep in mind that this type of process where you will need to insert the measurement ID into the labels will happen multiple times because each label will need to be manually pasted right here, so instead of just copying and pasting the ID to blinds, I would recommend creating a variable that will hold the ID and then in all your feature tags you will use that variable, this will save you some time. so let's do it, let's cut that measurement ID, click on the button to insert the variable and then we will create a variable, so click on more here than a verbal configuration and then find the constant here, you need to paste the measurement ID and then we can name this. say like this and click save for the variable to be inserted but we still don't see the green check mark so we could do it by cutting the ID and pasting it again because I think that's a bug in ge4 right now because when you insert the verbal from here sometimes doesn't trigger validation so let's add the event name, it can be anything you want, for example, I will name this menu link click, but sending only the event name is not useful because we also want to know about what type. of the link was clicked on what was the URL of the link or what was the text of the link.
That's why we also need to send some additional event parameters which can be done by clicking event parameters and then you can add the parameters right here if we go to In preview mode, click on one of the click events the link and then go to the variables. We can see that we have some data about those clicks on the link, of course, if you have enabled click variables, in my case I don't have the click ID, but yes. click on Text and click on URL, these are definitely useful, so you could send them with a manual and click on an event, so let's go back to the label and we'll add two parameters, so two rows in total, one row per parameter in Google Analytics, four, there are several links.
Related parameters are supported out of the box, one of them is the link URL and the other is the link text. This check mark here also shows that these parameters are parameters known to Google Analytics and here we can insert the variables that will automatically fetch the informationabout the link because for example if I click on the contact link I will have another click on the link and here the values ​​are different so Google tag manager will automatically select the information about the link, in this case it is text and URL and it will insert it. the data right here, so we need to use variables for that, let's click on the Insert Variable button and we will insert the Click URL variable because this is the parameter that we will send to Google Analytics and this is the variable that will help us send the value. of the URL, so I'll click Insert Variable and then click URL, then repeat the process for the link text, but this time we'll use the click text variable.
Finally, we'll scroll down to activate and select the click trigger on the link we created earlier. I'll call the tag this and click Save, so to summarize when you're going to create more event tags in the future, you should use the constant variable that contains your measurement ID that way you won't need to go to settings. from the data stream copy the ID and then paste it here you will just need to insert the variable into this field and it will work right away since we have the measurement ID here why not use that same measurement ID in our Google tag because right now? we have the static value, so I'll remove it.
Instead, I'll insert that variable which will simply select the ID and click save. What I did in the Google tag is not required, but it is a good practice. Let's test if this works correctly, so click preview. to refresh the preview mode and get the latest container update and now let's click on let's say the first link, the second link, the third, the fourth link. I'll close all the other tabs and then we'll go to the Google Analytics debug view for or actually, you know, let's go to the Google Tag Manager preview mode first, so here we have a bunch of link clicks, like I said, half of them come from improved measurement because it only identified the events, but in those link click events. the tag won't have fired, for example, if I click on this one, the attack didn't fire, the tag didn't fire here either, but the other half of the events come from The Click trigger in our tag matching container.
Google, so if I click this, the label has been activated here, the label has been activated and in fact, if you select one of those clicks on the links, you can click on the label to check what kind of information was sent , so the state is activated, this tag is activated because the click classes contain this and this. The condition matched so ignore this it's too technical and that's how triggers work under the hood so ignore that part and here we have the technical name of link click which is GTM link click so all these conditions were met, so this trigger was fired and this tag was fired this tag sent this event to this property and sent two additional parameters link URL and link text.
If you change from names to values, you will see what type of value was sent with the link URL and what type of value it was sent with. link text, if you check another event and do the same, the values ​​will be slightly different because we clicked on a different link, so once you make sure the tag was fired correctly, let's go to the Google Analytics debug view 4. So go to administrator. then debug View and here you will see a bunch of events, among them you will see the menu link, click also here we see a bunch of parameters, so ge4 tracked them automatically, but some of them were the ones we sent, which is the link . text and URL of the link so it looks like this is working fine so now we make sure this is working fine we can click submit and we can click publish but before that let's name this version let's say link from the G4 menu, click follow, click publish and now this change has been implemented for all website visitors within the next 48 hours, the menu link click event will appear in engagement and event reports Or, if you have different report names and structures, keep looking for any reports that mention events at this time. again, my page is empty because not enough time has passed after.
If you want to see what type of links were clicked and which ones are most popular, one of the ways to do this would be to create a custom report, so you would have to go to explore, then choose blank and then do the following settings in Dimensions , you will need to select the event name, click the checkbox, then link the text, click the checkbox and link URL and click the checkbox, then click Import into metrics, do click more and add the event count, click this and import and then drag the link. text and link url or you can just drag one of them for example then drag the event count to the values ​​and then in the filters you will need to limit only to manually click on the events so you will need to drag the name from the event to the filters and then make sure the event name exactly matches the menu link, click and click Apply, of course the report at this time will not show any data, but after 48 hours or so Once 24 hours, the report will start populating data where you will see the list of all the links and you will be able to see their names and URLs and you will also see how many times each link was clicked.
Yes, I agree that seeing that kind of basic data takes too much effort in Google Analytics 4, but that's how it works at least now, so if you want learn a lot more about how to work correctly with reports how to view the data how to find it how get value out of them then you should take a look at my detailed Google Analytics 4 course. I will post a link below the video and that is the end of this tutorial, now you have a better understanding of what Google Tag Manager is, how it works and how to create our first setting;
However, keep in mind that this is just the beginning of your journey, there is a lot more to it. that you will need to learn about Google Tag Manager and that is where my complete beginner course will help you. The video you're watching now explains about 10, maybe 15 of what a beginner should really know about Google Tag Manager; the rest, 85 percent, is explained. In my course, which is called Google Tag Manager Masterclass for Beginners, I will post a link below the video. If you found this video helpful, please hit the like button below the video which will help me understand what videos you like and what I should create.
In the future, also if you want to learn more about Google Tag Manager or Google Analytics 4, please consider subscribing to this channel. My name is Julius, this is Analytics Mania and I'll see you in the next video. Thank you.

If you have any copyright issue, please Contact