10 Fundamental Google Tag Manager Skills You Should Know

google tag manager fundamentals

We have trained numerous students over the years here at MeasureSchool.com. In this post I have compiled the absolute top 10 Google Tag Manager skills I think marketers should focus on to become c Google Tag Manager.

There are many great resources to address particular features in GTM, but this time we are going to dive into the some basics.

Knowing what to look for, what to fix, and ultimately where to get help is key to acquire Tag Manager skills.

Continue…10 Fundamental Google Tag Manager Skills You Should Know

Form Field Tracking with Google Tag Manager – The Ultimate Guide

Form Field Tracking with Google Tag Manager

So you have Form Tracking set up, leads are coming in and everything is going swimmingly.

But wait, you don’t have Form Field Tracking set up?

Don’t kick back too early. We all know that we can request users fill out certain information in our forms. For example, for company size, product quantity, company revenue, request type etc. 

All this information we request helps us to qualify our leads and collect information on them upfront.

However, this is super valuable data that I also would love to have available and make use of in my Google Analytics account or my Facebook Pixel so I can segment data, create retargeting audiences, and analyze our customer groups and preferences. 

Continue…Form Field Tracking with Google Tag Manager – The Ultimate Guide

Google Tag Manager vs. the Global Site Tag (gtag.js) – Similarities and Differences

GTM and GTag are two different tracking methods of achieving the same goal. So which one should you choose? In this video we are going to show you the key differences and similarities between using Google Tag Manager vs. GTag for your tracking implementation, so you can decide which one is right for you.

🔗 Links:

Gtag – Global site tag https://developers.google.com/gtagjs

Google Tag Manager https://tagmanager.google.com

Hey there measuregeeks. Julian here back with another video for you. Today, we want to talk about the Gtag, the global site tag versus Google Tag Manager, the similarities, differences and what we can do with both. All and more coming up.

All right, let’s jump right in. What is this all about? Well, if you install Google Analytics on your new website, you go to the tracking information. And there is where you find the Gtag, the global site tag. This is the tracking code that most of the tools of Google want to nowadays to install in the head section of your website on all the pages. This will start tracking your information on your website and transfer it over to Google Analytics to the Google Ad system, floodlight tags or Google Optimize. So what is this Gtag all about? It was introduced by Google in 2017 because previously, they had different products in the marketing suite. So all of these different products actually had their own tracking code. So for Google ads, that was, for example, conversion js, for Google Analytics, it was analytics js. Now obviously, this led to a lot of confusion because once you started building your tracking and adding tools from the Google line, you would start implementing all these tracking codes onto your page. A lot of different tracking codes that convoluted your account your HTML, your JavaScript execution, and at the same time, it wasn’t quite efficient.

Because what if you wanted to just check a page view, you’ve already done this once now you need to send it over to these other different tools again and again. So Google came up with a new way to consolidate all of these different tracking scripts into one which takes care of the heavy lifting, so you only need to install the code once. The Gtag is nowadays the standard that Google wants you to install as the code onto your website for the tools to track the way it works is actually you have a base code that you place on the top and underneath, you can configure different tools like Google Analytics, or Google ads or the optimized tag. And then these will be loaded in the background. And then you can send data over, the page view to Google Analytics and to Google ads for retargeting, for example, all the conversions to both tools. And obviously, this makes it a bit easier and keeps the whole tracking thing a little bit shorter inside of your HTML. So you don’t convolute your whole codebase.

So what then is Google Tag Manager all about? What is Google Tag Manager? It is a tag management system. With Google Tag Manager, the premise is that you would have one container snippet, which you place on all your pages of your HTML. And then you would be able to deploy all your tracking tags such as quotes from Google Analytics, Google Ads, but also Facebook Pixel, LinkedIn tag, and so on through the central interface of Google Tag Manager. This is not restricted to any Google products, although Google Tag Manager is a product from Google. But you can also take the Facebook Pixel, put it into a custom HTML tag. And then it will be deployed through Google Tag Manager through this one central snippet that you have installed. You can do much more with Google Tag Manager, then with the G tag not only deploy the code, but you have extra benefit of testing the code before. You have this graphical user interface. You have version control, different triggers that you can utilize to deploy all this tracking. But the premise is really also the same, like the Gtag you can define one interaction with a trigger that you want to track and then send different quotes out at the same time. So to Google Analytics to send the event to Google ads, maybe a conversion to the Facebook tag, or the link in insights tag. So really, you can do the same thing with Google Tag Match than with the Gtag.

So where are both tools similar and where are they different? Well, we already talked about the similarities really. Both of these tools, these tracking scripts can deploy multiple tracking points or one tracking point to multiple tools. So when you want to send a page view on to Google ads and Google Analytics, you can do this with Google tag manager or the global site tag. But there’s where it really already ends. Because the global site tag is only there for Google products that Google products are connected to the global site tag. So you can send data to Google ads or to Google Analytics, but not to the Facebook Pixel. Google Tag Manager is more flexible in that regard. It is agnostic to any tools out there. So you’ll be able to send over data to any kind of tool that is JavaScript based and has a tracking code that you can install, either through a tag template or through the custom HTML tag. And obviously, Google Tag Manager brings in more functionality like the management functionality, the version control, the testing, and so on, and so on. So it’s much more sophisticated in that regard.

Now, when we compare both of these tools, again, we see that the global site tag is not really up to par with Google Tag Manager. It has some similarities with sending tracking out, but it doesn’t have a graphical user interface. So you would need to do still all your coding within the code. And you would need to know a little bit of JavaScript in order for it to work and configure it correctly. And it’s not that easy to install any kind of extra functionality, advanced functionality, such as button click tracking with the global site tag. So in the end, the global site tag is really just a mini version of Google Tag Manager, and can be really compared to it. So when would you utilize the global site tag? And when would you use Google Tag Manager?

Well, let’s imagine you have a brand new website and you just want to stop Tracking some information about how users behave on your website, you want to install Google Analytics. So you go over to Google Analytics, there is where you will find the Gtag to install in the head section sounds easy. You place it there all is good. But what if you grow, you want to drive traffic to the website, so you go with Google ads. And they’re also asked you to install a global site tag onto your page. It is easier this time because you already have it installed, you just need to add one line of code. And then it will actually send data over to Google Analytics and to Google ads. Now what if you grow even further, you want to do Facebook advertising, you want to do Bing Ads, you want to do LinkedIn advertising? What tool do you use now? At that stage, I would say it is better to go with Google Tag Manager. Why? Because manually installing these different codes would again convolute your website code and it would be just sheer chaos inside of the HTML because you don’t know what fires when to which tool. Google tag manager can take care of this for you. And you have a nice graphical user interface where you can manage all your code. So at that stage, I would say, maybe look at Google Tag Manager as an alternative to placing these codes manually on your page.

So which tool would I recommend if I had the ability to install the Gtag or everything to Google Tag Manager? Well, I would choose Google Tag Manager definitely. Even at the beginning, even if it’s your first website, and you don’t have any tracking installed, you want to install just one code. It is a far better practice to do this through a tag management system, rather than trying to put these codes on manually. Now, there might be legacy cases out there where you want to utilize the global site tag instead of Google Tag Manager. There might be also a use case where you say I don’t want to use Google Tag Manager at all. I want to track my code differently or I have a module that I have written myself onto page, I manage these codes differently, yes, then go with the global side tag. But in most of the cases, I would recommend to go with Google Tag Manager just because it’s best practice. And it is the way to install tracking nowadays.

So some questions at the end, can I install the global sidte tag through Google Tag Manager? Yes, kind of. Remember, the global site tag is like a mini version of Google Tag Manager. So it’s already sending data over to the different tracking tools. So you will not install the global site tag into Google Tag Manager per se, but take these tools and install them into Google Tag Manager. So if you’re sending with the global site tag data over to AdWords or to Google Analytics, well, then you would need to utilize the tag template within Google Tag Manager to deploy the same tracking points with Google Tag Manager. Please don’t take that global site tag that you see in the interface of Google and put it into a custom HTML tag and deploy it through Google Tag Manager. That would lead to problems maybe, and also is just not best practice. So is it okay to have Google Tag Manager installed and the global site tag at the same time? Well, the general answer is yes, these are compatible with each other. But they also utilize some of the same resources. So for example, the Google Tag, Google Tag Manager uses something called the data layer. And the global site tag also uses something called the data layer. So there are some shared resources. And these can also lead to conflict. So you need to be careful that you don’t mix and match and you always would need to test your implementation to see if the right data gets sent over. And this makes the whole case a bit more complicated, doable, but complicated. Generally, I would recommend not to have both tools on the website at the same time, although it is possible.

So in conclusion, who wins Google Tag Manager versus Google analytics? I will clearly say Google Tag Manager is the tool to install tracking nowadays. The global site tag is there for convenience sake, but only at very specific use cases. So I would always go with Google Tag Manager when I install Google tools like Google ads, Google Analytics, or Google Optimize. This is my choice when it comes to deploying tracking. Nowadays, the global site tag is really just a mini version of Google Tag Manager, not as flexible, not as powerful as Google Tag Manager. So if you have a specific use case, and you want to stay small, and Google Analytics is all you need on your website, then maybe go with the global site tag, that’s all fine. But if you want to take tracking seriously and track data on a consistent basis, then definitely check out Google Tag Manager, if you haven’t yet.

We actually also have a course on this channel, Google Tag Manager for beginners dive into it. I’m going to link it up right over there.

And this is already it with this week video. Let me know in the comments below if you still have questions about the global site tag and the differences to Google Tag Manager, which one do you use? I’d love to hear from you in the comments down below. And if you haven’t yet, consider subscribing right over there because we bring you new videos just like this one every week. Now my name is Julian. See you on the next one

How to Track Outbound Link Clicks with Google Tag Manager (2020 Updated)

‘How can I track the clicks on my affiliate links with Google Tag Manager?’ That’s the question we got from our student Tom this week. In this video, I’ll go through the steps to set up and measure outbound link clicks, they’re links that take the user away from your website.

🔗 Links:



In this video, I’m going to show you how you can track external link clicks with the help of Google Tag Manager and forward this information on to Google Analytics. All and more coming up.

Hey there measuregeeks, Julian here.

Back with another video for you. Today, we are answering a question from our MeasureMaster Tom. If you don’t know what MeasureMasters is, it’s our premium membership community. You want to check it out down below, we’ll have a link. Well Tom asks, how can he track his affiliate link clicks on his website with the help of Google Tag Manager? Well, this is really the external link click methodology of tracking links with the help of Google Tag Manager. Then you can forward this information onto Google Analytics or your facebook pixel or your Google Ads tag in order to this be your goal or retargeting audience. With Google Tag Manager, we can do this pretty easily because there’s a built in functionality and actually there’s something new in this technique that was announced a little while ago. And now it makes it even easier to track outbound link clicks. So without further ado, let’s dive in and see how we can track external link clicks with GTM.

Alright, to get started, we have here our demo shop where I have already Google Tag Manager installed. And we now want to pick up any kind of external links that the user clicks on. So we’re not talking about internal links, like to this blog post right here, but rather external link clicks, such as we have, for example, here to wordpress.org. This go outside of our domain and it would be a good idea to know which links to user clicks in order to leave our page. So you might want to optimize this, but it might also have another purpose. For example, if we have an affiliate product in our store on our blog posts, such as this one, we want to know how many people clicked actually on this link to go to our partner store. And then we track this with the help of Google Tag Manager and Google Analytics. So let’s get started. In our Google Tag Manager, to start tracking links, we need to have a trigger setup. So let’s go over to the trigger section here, and click on new. And this will be a generic link click

trigger. Why do I say generic? Because we are going to just deploy the listener functionality to see if it actually works. And then later, we will specify to only track certain clicks. So let’s proceed with the trigger configuration. We click on the field and choose the just links option right here. Now, you might be tempted to use all elements. But this wouldn’t detect the actual link in the background. So when the user leaves the page, and therefore we need to use to just links click trigger. We leave all the configuration untouched for now, and just save this. Now that we have this installed, we go into the preview and debug mode, which will put our browser and Only our browser into a special mode where we go back to the page and reload the page. If we have Google Tag Manager correctly installed, you should see a preview mode down here. And this will give us useful information on what is happening when the user interacts with our page. So for example, if I click on this image here, I will do this with the Command keypress or the control key pressed in order for it to open up in a new tab. We see that our link click fired right here. And this needs to happen in order for us to know that our listener functionality actually works. So we know that our trigger is working correctly. We have here the link click, and with this link click, currently, nothing is happening. And we can also click on

the Buy Now button right here. And this is obviously desired click that we want to distinguish of clicks that are internal to our page and external. So we need a way to distinguish the fifth from the seventh click here. How would we do this? There is a new method to detect outbound links in Google Tag Manager. We need to create a variable for this. So let’s go over to Google Tag Manager and click on variables. And here we’re going to configure a new user-defined variable. The variable type will be an auto event variable. And the variable type that we choose here is the element URL. And then we get this little compound Type menu down here where we can choose is this outbound. Now, there is one more setting called affiliated domains. So what this variable essentially does, it will detect whether the link that you have clicked is outside of the domain. It will look at the element URL. And if the element URL is different from the URL that Google Tag Manager is installed on, it will tell the variable Okay, this is an outbound link click. You can choose affiliated domains which are domains that you don’t want to count as an external link click.

So if you have any kind of subdomains or domains like paypal.com, where the user would naturally go to, but it’s not really an external domain that you want to track, you can put them in here as a comma-separated list. For us, this should be fine. We’ll go ahead and give this all a name. Let’s save this and see how this behaves. Let’s refresh our preview and debug mode. Go back to our page, refresh that. And let’s try this out again. I’m going to click on the internal link and then on the external link, and we see here we have our fifth and seventh click. Our fifth click doesn’t have any tags firing right now, but we can look into the variables and especially in our auto event variable that is outbound, and it says false. So this is actually an internal link click our tags shouldn’t fire and we don’t want to track this. But on the seventh link click we also have false. We see I clicked on the image. The image is actually an internal link. But if I click on the Buy Now button, right here, so our ninth click, we see that the auto event variable turned true. So this is an actual click that leads our user away from the website. This is something we want to track.

So we can now change our trigger over to only turn true when this variable is actually true. So let’s go ahead in Google Tag Manager and turn our trigger into a specific trigger. So the link click will now be for outbound links, External links. And as this trigger fires on option we go with some link clicks, where the auto event variable is outbound equals true. That’s really what this is all about. Now you can tick these option if you want to, but I will test them a bit month in depth so waiting for tags is a good option in order for the browser to have time to process the outgoing request to Google Analytics before he redirects the user on to the external website. And check validation is something you would need to experiment with, it pertains to the callback function that happens within the browser for the link. And if that is successful. For now, I will leave this turned off. Now since I click this first box right here, there’s another menu that pops up, it says enable this trigger when all of these conditions are true. Now, this pertains to the listener functionality. Where do we want to listen to all of these clicks, I want to do this on all the pages. So I will go with the page URL matches regex dot star, which would match up to any URL that Google Tag Manager is installed on. So let’s save this and we can really try it out because we don’t have a tag that we would fire. So we would need to create a tag first. And the tags are the information that you sent over to your tool in the end. In our case, that would be Google Analytics. But you could also do this for Facebook ads or Google ads. So let’s go ahead and give this tech a name. We want to build a Google Analytics tag, we’re going to send an event and for external link clicks.

As the tag configuration, we choose our Universal Analytics. And as track time, this time we choose event. Now, we get all these different categories, you can fill them out as your heart’s content. But be aware that this will show up in your reporting later on in analytics. So for us right now, I’m going to go with the category External links. Now, I also want to know what link was clicked. So I’m going to go ahead and choose an auto event variable. Unfortunately, I haven’t activated them yet. Go with built-in variables, and I’m going to choose the click text. And as the label I’m going to choose the URL that the user actually went to. So again, I’m going to choose a built-in variable which is our Click URL variable, alright. As the noninteraction hit, I will choose true. So it doesn’t mess with my bounce rate. And I can choose where to send my Google this information, I have a Google settings variable already set up. If you don’t have one set up, you can click on enable override settings and put your tracking ID in here in order to send it to the right account. Now we just need to choose the trigger. We already prepared that right here and save this. And now we get to the last part where we would test this on. So let’s refresh our preview and debug mode. Go back to our page and try this all out. I’m going to click on an internal link first. We see nothing fires. Now, let’s click on this Buy Now button. And we have the seventh link click and we see Google Analytics event external link clicks fired. Our tag fired and information should have been sent to Google Analytics. How can we verify? Let’s go over to our tag assistant and look into the information that was sent over Google Alerts right here. One event was sent. This is our event that was sent. And we can see our category was External links. That’s what we entered in our attack configurations. We have the action, which is the link text by now. And then the label the actual link that the user went to.

Let’s test a little bit more. Let’s go can on, go to this blog page. Now, nothing should fire. Nothing fires right here. You’re getting redirected on to our shop and our blog right here. And if I click on this wordpress.org link, what happens again, with the Command key pressed? We have a fifth link click, and our event external link clicks has fired. Again, let’s look into our tag assistant. And we see Google Analytics one event fired. We have an external link click the action which would be the text of the link that was clicked wordpress.org and the label is the actual URL. So this seems to work as expected. And we have now tracked all the links that are external to our page on the whole website. Now let’s verify one more time inside of Google Analytics. Inside of Google Analytics, we should see data come up in the real-time reporting. So let’s go here under events. And we see there was a link click right here. So a few seconds ago, if you go to events last 30 minutes, we see here our event category was external link clicks, and somebody clicked on the Buy Now button. Another one was, again, external link clicks, this time, somebody clicked on the link wordpress.org. Now, this data will be recorded and later on, be available in your behavior reports under events right here. You should be able to see all the different external link clicks. Unfortunately, this takes a while to populate. So just for verification, we can see this in the real-time reporting. All right, now that we have verify that everything is working. There’s just one last step because this is actually not yet live on the website. And it’s tracking user actual user information, you would need to submit a version. So it goes live on your website, give your version a name. So you recognize it. If you want to roll back later, then you publish this.

And after a second, your version is now published, and it’s live on the website. All right. So there you have it. This is how you can track external link clicks, and also your affiliate link clicks on your website with the help of Google Tag Manager. I hope this answers your question, Tom. And if you have a question, and you can leave it all the time in the comments down below, I read all of them and try to answer most of them if they actually make sense. And if you want to check out our MeasureMasters program, don’t forget the link down below in the description. Now if you’re new here, then you probably haven’t subscribed yet. So I’ll give you the chance right now over there. We bring you new videos every week. So you definitely should hit that subscribe button. Now, my name is Julian. see on the next one.

🔴 How to label Users in Google Analytics with Google Tag Manager

It’s common to label or tag your users in your CRM, but how can you do it in Google Analytics? In this live stream we’ll discover a simple technique to label our users directly in Google Anlaytics on our Website. And of course we’ll do this with the help of Google Tag Manager

FREE GTM Course: https://measureschool.com/products/

FREE Google Analytics Course: https://measureschool.com/products/

In this video, I’m going to show you how you can label a visitor within Google Analytics with the help of Google Tag Manager. All and more coming up.

Hey there measuregeeks, Julian here back with another video for you. Today we are live on the channel. This is a live recording. And we’re gonna give you a little bit of a tour of how to label a visitor within Google Analytics with the help of Google Tag Manager. If you want to be online and actually asked questions which I’m going to answer after this recording, then a new few seeing this actually after the fact and you should definitely subscribe to our channel and hit that bell notification icon. So you’ll be notified once we go live here on this channel again. Alright, today we want to talk about how we can label a visitor within Google Analytics. What does this actually mean? Well, if you have a CRM system like MailChimp, or Active Campaign, or HubSpot, you might be familiar that you be able to go into a contact record and actually assign a tag to a user. You can label this user or tag this user and say, Hey, he bought this product, or he has… he’s a newsletter subscriber, for example. That is valuable information that sticks to the the user profile of the user inside your CRM system. And then you can backtrack later on or filter by the tag, for example, all the users who have this tag. We can actually do the same in Google Analytics. And this can be quite useful because we can also filter and segment our users within Google Analytics, and maybe one or the other user group or a user who was tagged in a certain way and is behaving in a different way. So you can look at for example, all your past customers You are ecommerce shop, or you’ll be able to look at everybody who has logged into your product. And if you are a SAS or a tool that requires a login, and you could look at all these users and segment them out for looking for prospects or looking for people who have logged in who are actual customers already. Or people who you actually want to filter out as well. So, for example, internal users of your platform, users of the colleagues, for example, you could tag these people who come to your Google Analytics and filter those people out so they don’t pollute your analysis later on in Google Analytics. So labeling visitors can be quite useful within analytics. And today, I’m going to show you how to do it. So let’s dive into a little demo here. I’m gonna switch over to my screen right here. Let’s put this on to the top actually, and we’re here in our demo shop. Now in our demo shop, we have already installed. as you can see down below, Google Tag Manager and the normal Google Analytics pageview tag. Now, I want to introduce a little bit of a case here, where what we want to install today. So let’s say we want to label all the visitors that come to our page, who are already newsletter subscribers. Because we, for example, don’t want to analyze our newsletter subscriptions based on the users who have already subscribed, but the people who haven’t subscribed yet and see how we can optimize the website. So we would need to attach an attribute, a property to the user and to use a record within Google Analytics. So how can we find users who already subscribe to our newsletter? Well, when we send out a new setup, for example, I sent this newsletter to myself here, we can put in links that point to our website. And once I click this link, hopefully your links are UTM tagged. So when we go to this website, we have a UTM tagged link right here. And that tells Google Analytics which column, which road to put them in into our source medium reports. You might know about this, if you don’t know about this, you should definitely check out our video on UTM tagging. But we can actually use this information as well to tag our user as a new set of subscribers. So every time a user comes to the website to this link, then that’s something we should tag later on.

Let me just check over here and see, okay, let’s go on. I’m just checking the sound here. Let’s go on and this information is now available on this page. At least To the US and also to Google Analytics. So within Google Tag Manager, we can go ahead and take this user information app. And or take this as a trigger and fire a new attribute to Google Analytics and tell Google Analytics this is a user who is a newsletter subscriber. Now, how do you tell Google Analytics this? And this is where Custom Dimensions come in. Now, custom dimensions are attributes that you can attach to data. Every time you send over data to Google Analytics, like a page view or an event, you can add a given role to or a new column to the data set. And obviously, you know, when you send over page view, the page URL gets sent, or the screen size of the user gets sent, or where the user just came from, gets an and parameters get sent. We can actually attach customer information to it and tell Google analytics this is a newletter subscriber or not.

So first of all, we would need to configure in Google Analytics. Let’s go over to Google Analytics, our custom dimension. So where we can do this and this is customer information, go into the admin section here. And in your property settings so in the middle row here, you can go under the custom definitions, and here you have custom dimensions. And you can see I have already set up some custom dimensions for this account. But if you’re new to this, you can click here on new custom dimension, and enter a name for your custom dimension. You can call this whatever you want, for example, in our case would be is this user a subscriber? Now then you use the scope, the scope, that’s something you need to configure. And this is really about where you want to attach this information and how it gets processed. Now, I don’t want to go into deep into scope. We actually have another video of what is scope in Google Analytics, you should definitely check it out. If you don’t know what scope is, but what this functionality will do is when we use the user scope here, it will attach it to the user in Google Analytics. So as long as the user has the same cookie, or the same client ID or the same user ID, this information will persist throughout his user record. And this is very important because we only can, we only need to fire our custom dimension once when the user comes, for example, to this landing page. And then this information will persist throughout his lifetime of being a user in Google Analytics. So we can create this I won’t do this right now because I actually have a custom dimensional aleady set up right here. And once you once you click create this dimension, you will get this little window here. And the information that you really just need is the number of the dimension in our case, it would be four.

So if we click cancel here, we see also the index is number four. This is a number you need to remember. So now inside of our demo shop here, well, actually this one, we want to fire a custom dimension every time somebody comes with the UTM source newsletter. So I would say let’s, we can do this in different ways. But since we are looking at the URL right here, let’s build a custom variable, first of all, that will detect what is in the UTM source, or maybe take UTM medium. Let’s take yeah, let’s take UTM source because maybe you’re sending out an email that is not a new setup. So let’s go ahead and Google Tag Manager and just build a custom variable. So user defined variable and This will go into our URL scope. Or we’re looking at the URL type. And we’re going to look at UTM source. UTM source is a URL right here.

And then we’re looking at the query parameter, which is UTM Source. If you don’t know what query parameters are, this is also something we explain in a video. But I can pull out whatever is behind the equal sign of the UTM source right here. This is a query string, and the parameter of this query since UTM source and we want to pull out the newsletter. So I’m gonna put this here in here. And let’s save this internet is slow because I’m actually streaming at the same time. Refresh this, go back to our page. And let’s reload this page actually going to close this page.

Alright, well, this loads pretty slow. Okay. Now our previous debug mode is loading. And we should be able to see in our variables here that our UTM source is now newsletter so pulled out directly this what I wanted. Now I need to have some functionality in there to tell Google Analytics if this is the newsletter, then turn something to true. Why do I want to do this? Because I want to send in an attribute to Google Analytics and to this describe a column subscriber column of the value of true so I need to rename this somehow. And I can do this with a easily you can do this with a custom JavaScript variable. But another way to do this would simply be a lookup table. So I’m going to build a lookup table variable. That will look into my UTM source variable. And every time it finds news attender vagaba, I want to rewrite it into true.Alright, that should do it. Let’s refresh and try this out again.

And now we should see can all see this in slow mo here. That our lookup table variable that we have just built is now true because we have this newsletter industry. So let’s do a negative test, let’s say just whatever. If the user doesn’t have the source newsletter in there, this should just turn undefined, hopefully. So here we have lookup table undefined. Now undefined is very important because Google Analytics will actually ignore undefined. And therefore we can just put it in there. And this is really it ready, we can now attach this to our Google Analytics, pageview tag. So in Google Analytics, we already have a pageview tag created I have done this beforehand. And here in the settings, you can override enable override settings. And that’s how you get these two menus down here. If you don’t want to do this, you could also put this into the Google Analytics settings terrible for simplicity sake, I will just unable to override settings And here under more settings, I will go with custom dimensions. And here I need to enter the index. So as you remember the indexes right here we have our index is number four. And therefore I will put in the number four. And then the dimension value will be the value that I want to push actually into discussing dimension. So into this column that I have prepared. And I want to push in true if the user is actually a new set of subscriber, if it’s not a new set of subscriber, I want to just have undefined and there because Google Analytics will ignore this. All right, let’s go ahead and simply use our lookup table variable to fill in this dimension value. Let’s saved this

and refresh. And now if a user comes from a newsletter link

comes to the page, our Google Analytics page view tag should fire and the page view tag, we have our custom dimension defined, which will pull out from our lookup table variable, which in turn pulls out from our URL variable. And therefore it should say true as the variable festival. Yes, he it’s true. And then for the page view, it didn’t find this one. But it fired here, the page view we can see here that the field to set know, here Custom Dimensions index is true is now set to true. Now we can also look this up in our developer tools. So if you have developer tools open, you can enable this extension GA debugger. And this will give you some information about what was sent over to Google and analytics. And right somewhere, here we go. So if you see this part right here, we have the dimension value four is true. And if you have a negative test right now, again, let’s go with just this XXX. The user comes maybe from another newsletter or he comes from a completely different source, YouTube, Facebook and so on. He has not yet a new set of subscriber. Now I don’t want to set this field to false because obviously, this user might be a new set of subscriber already coming through a different source. Just want to set this to undefined. And right here, you can see that this is actually not part of the hit because Google Analytics ignore this information. It still tries to configure the tag. We see here, index for dimension value undefined, but in the actual Hit that gets sent, this information is not part of it. Now, it’s a bit tricky to see this information now in Google Analytics. Well, it’s tricky to see it. But it’s tricky to actually debug this information. Because in the real time reporting itself, we will not see custom dimension values that get sent over, we only see if there was a page view generated, which there was a second ago. But unfortunately, there’s no way to see like in the events, what data was sent over. The only thing that we can hope for is to check back in an hour. So when that data is actually processed. And hopefully in the user explorer report, you’d be able to see the user. So for example, we need to go to our date right here. And you know how every user gets a client ID going to go into the developer tools and look up my client ID here.

I have a client ID

with 661. And in Google Analytics, we have one user with a session three sessions already 661. And then right here, you should see subscriber custom dimension is true. Unfortunately, this has not yet been processed. So it’s not in here quite yet. But we should see this later on as a subscriber true. Now, how can you use that data in Google Analytics, then? First of all, you could build a custom segment. So as you might be familiar with custom segments appear, can build a new advanced custom segment. Oh, here we go. We can just say a new segment and every user that has a way to go, just go with the condition filter, every user who includes the attribute, subscriber, and this is what we have named The custom dimensions so we can find it here. subscriber contains true or equals true.

Exactly matches true. So we have one user 50% of users who are most definitely website, we can say, subscribers. Now we have a segment where we have filtered down to everybody who is a subscriber. And this will actually persist. So if if the user goes to the next link and clicks on, I don’t know clicks on this link, the user property within Google Analytics will persist. So this user will stay tagged or will stay labeled as a subscriber. This is also true when you want to, for example, filter out user so you could build a filter based on this and say the view setting or inside of the filter settings right here. You could filter by people who have this attribute, right, so you could build a filter and say only subscribers or without subscribers. And this will be a exclude field, we want to exclude users who have not yet in here.

Here customer mentioned subscriber filter pattern is true. So you will exclude everybody who is a subscribing you can use it in the exclude filters. And you can also use it I’m not going to configure this and you can use it in any kind of other report. So for example, if you go to our all pages report, this is just an example you would find this others of you always know you have a table down here. And now if you would like to only look at subscribers, so right now we’re looking at subscribers because we have a

Custom segment on here,

you can add this as a secondary dimension subscriber. Now, I will tell you if this is true or false. For so far, for our case, it would be true. But if we have a subscriber that doesn’t have this attribute, this would be empty, it would be filtered out actually automatically. So in the end, you can add this to any kind of table that you would like to just be aware that there is something called scope in Google Analytics. So you can mix and match all the data together. So if you get weird results, like no results at all, it might be that you’re running into this problem of scope in your reports. You can also customize a build a custom report. So we can go to custom reports here and create a new custom report for all our subscribers. And we add a metric now this needs to be User scope. So we will go with users and add a dimension, which is our subscriber dimension. So we have added a custom dimension to tag the users on the website. So we have one user who is true. And we actually see if our older users who when I was testing earlier, are tagged. No, not yet. Alright, so this is how you can then see this data in Google Analytics. Don’t forget, if you want to take this live to all your users, you will need to submit this as a version and publish this so it goes live onto your website. So you be henceforth tracking all your users and labeling them when they come to your website.

So this is already it’s with a little demo on how to label users with the help of Google Tag Manager in Google Analytics. Now this might be useful if you, for example, want to filter out users who are coming to a login page and login to your website. Or you want to filter out everybody who is actually already a customer comes to the thank you page, or you want to filter out or filter for people that have done a certain action. With Google Tag Manager, you can be really flexible in doing this and I hope you’ll come up with some other use cases that might be useful to you. And yeah, I’d love to hear from you in the comments below, as always.

And if you haven’t yet, then definitely subscribe to our channel right over there because we bring you new videos just like this one. And if you want to be live, definitely, definitely subscribe because we go live and I’ll answer questions after this video. So if you want to be part of this next time, subscribe to the channel. And let me know what you thought of this video and comments down below. Now my name is Julian, see you next time, in the next video, see you in the next video.

How to Create Custom UTM Parameters via Google Tag Manager

In this video, let’s go through the process of creating custom UTM parameters so you can easily track whatever UTMs you like and then see them directly in Google Analytics. This comes in handy for things like discounts and other UTM variables not part of Google’s defined set. We’ll be doing this with the help of Google Tag Manager.

🔗 Links:

Google Tag Manager https://tagmanager.google.com

FREE GTM Course: https://measureschool.com/products/

FREE Google Analytics Course: https://measureschool.com/products/

In this video, I’m going to show you how you can create your own UTM parameters to include your custom value and transfer this on to your content tracking. So you have that information available in Google Analytics. All the more coming up.

Hey there, Julian here back with another video for you. Today, we want to talk about how we can create a custom UTM parameter. This is actually a question that came from Ahmad who wanted to know how to do this. And the premise really is, what if you have exhausted your UTM parameters that you have in your URL, and you want to have customer information that is transferred into your Google Analytics? Well, this is actually something we can do pretty easily with the help of Google Tag Manager and then forward this all on as a custom dimension to Google Analytics. So we’ve got lots to cover. Let’s dive in. All right, to introduce you to our scenario today we have a newletter here, we have different links to our website. And these links, obviously UTM tag, which means they have this which Google Analytics reads automatically and transfers into campaigns, which you can later look up to see where the traffic came from. So for example, here on the acquisition campaigns, you’ll be able to look at all the different campaigns that you have. If you are filling out the UTM term, you might be able to fill out the keyword column or other columns, like the source medium column, right here. So I’ve built this link with the actual official campaign builder tool here, which is simply a form, which you link and then we have these fields available, the source medium, the campaign name, term, and content. Now three of these are mandatory, but the others can be filled out if you want, or you can leave them empty. But let’s say you wanted to differentiate from our newsletter here. How much discount I get 90% off, 50% off, 20% off. Unfortunately, all of our forms are here filled, we won’t be able to add this to our information of our campaign UTM sources, and also, frankly, doesn’t quite fit in any of these. If only there was a way to add my own UTM parameter that I just make up, just like, let’s say, discount equals, and in this case, it would be 90%. Now, unfortunately, when you come to the page, Google Analytics won’t grab that information because it doesn’t actually understand it as you are going out of the rule set of UTM parameters and creating your own custom UTM parameter. So today, I want to show you how you can send us on to Google Analytics nonetheless, and thus create your own UTM parameter. To get started, we need to read this information first of all, so we have the value of the 90 here inside of a variable. So we’re going to go ahead, I already have Google Tag mentioned. So to Google Analytics page, your tag, just into Google Tag Manager, and build a new custom variable, and this will be a URL variable for discount. Let’s go ahead and choose the URL type from our variable menu. And we want to get the component of the query. And here we want to look for a special key within the query. And if you don’t know what the key is, its thing in front of the equal sign, we actually have another video on this show. I’m also going to link up down below how these query strings actually work. But we are interested in this key to pull this value out. So we simply need to know the key. Okay, this is the key and go back to Google Tag Manager and enter our discount here. That should do it. Let’s save this and try it all out. Going to go over and refresh our preview and debug mode. refresh our page and upon the page, you we should have have our variable available now, which is our URL discount variable and it holds the value, whatever is filled in here as a discount equals, let’s just try it out, see if it’s dynamic.

And as you can see, this value changes if there’s a different value appear in the URL. So now we have captured this via the variables. And we now want to feed that information into Google Analytics. And we’ll do this via a custom dimension. So if you want to make up any of these dimensions yourself, you can build custom dimensions. How do you configure them, just in the admin menu, just under your property settings and this column in the middle, we can go for the custom definitions and here we will get the Custom Dimensions I already have some created here, but I will go ahead and create a new one, which will just call discount, and as the scope we choose session as our UTM paramenters are also scoped to the session and keep it active as creators. And all we would need right now is just to know the number right here, which is the dimension number. And in our case, it would be three. So how do we now build this into Google Tag Manager, it’s actually pretty straightforward. inside of our Page tag or any other Google Analytics events, we will need to build in this custom dimension. Right here under the override settings, you can go on the more settings, and here, will see the custom dimensions, we need to add the index, which in our case was three, and then dimension value. In our case, it was this URL discount. So the dimension number three will be filled with whatever is in the URL as value. This is how you can set up a custom dimension in a single Google Analytics tag, you would probably need to go through all the Google Analytics tag. If you wanted to do this method. We can also actually build this into our Google Analytics settings, variable directly. So let’s do this, as it’s actually the recommended way of building in custom dimensions, especially if they are scope to the session. Go ahead and go into our Google Analytics settings variable. And here we have the same settings available for the custom dimensions, you go with the index three again, and then choose our variable, which was our URL discount right here. Let’s save this and refresh. And let’s go into the preview mode. And here we have our UTM tag link with the 50 attached. And our page to tag file. Now we can look up in our tag assistant will send over so we have Google Tag mentioned. So Google Analytics here. And this sent our one page request with the custom metrics of dimension number 3 and 50. So this data was sent over to Google Analytics just fine, but how can we now see it inside of our analytics. Let us go back to our acquisition reports. And we have here all traffic, let’s go to the source medium. We have the right data here, and we see our newsletter email. And we can simply go up here to our secondary dimension and type in our discount. And here we get our custom dimension. And it’s not, it’s filled, probably because we just set up the page a second ago. Be aware that this can take a while up to one half an hour, or even longer to this is calculated. So we just need to check back later if this actually works. But here’s where you would find that data. You can edit actually to any other session based report to know which discount did the user get if you want to look at an ecommerce report and see through which discount email that the user come you would find this into this field and you just need to activate it as a secondary dimension. So what we have done in essence is extended the data set of Google Analytics with another dimension and dimension that is custom to our needs. And this is a great example for customizing your Google Analytics installation to fit your needs. Don’t forget, if you want to take this or live in the end, go over to Google Tag Manager and submit this as a version. So this will go live to all your users.

Alright, so there you have it. This is how you can create a custom UTM parameter. Will you use this technique? Where would you find this useful? Let me know in the comments down below. And if you haven’t yet, consider subscribing to our channel right over there because we bring you new videos just like this one every week. Now my name is Julian. See you in the next one.


How to Track Phone Number Clicks with Google Tag Manager

Phone Number Tracking

Phone Number Tracking can be done with Google Tag Manager by firing an Event to Google Analytics every time someone clicks the phone number text on the site, which then opens up the phone app notification.

In this video, we are going to use GTM’s Auto-Event Tracking capabilities to build a Click Trigger, which transfers our data to Google Analytics.

🔗 Links:

More Click Tracking with GTM: https://www.youtube.com/watch?v=r87A-Ql2czg

FREE Google Tag Manager Beginners Course

FREE Google Analytics Beginners Course


In this video, I’m going to show you how you can detect a click on a phone number with the help of Google Tag Manager and send this on to Google Analytics, Google Ads, or Facebook Ads. All and more, coming up.

Hey there measuregeeks, Julian here back with another video. Today, we want to talk about how we can detect and register if somebody clicks on a phone number in their browser or on a mobile device that will then open up their phone app. I’m on a Mac here so it asked me to open FaceTime. But if you would be on a mobile device, it probably opened up your preferred phone app. Now be aware with Google Tag Manager since it’s JavaScript and installed on our webpage, we cannot detect whether somebody actually calls the number. But the next best thing is to know if somebody clicks on the phone number. And since this opens up the phone app, this is actually a special link. So let’s first look into how this is marked up in the HTML. We’ll go into inspect element here. And we see here our phone number. And the special thing about this phone number is that it has the extension here in the front with the towel colon. And this actually tells the browser This is a phone number, which can be open in the phone app. So if you have the same markup on your page, how would you track this with the help of Google Tag Manager?

Well, this is all possible with your auto event tracking features of Google Tag Manager. If you’re familiar with click tracking, this should be easy to handle. So as you can see on this page already, I have Google Tag Manager installed. I have a Google Analytics page view tag that is firing on all pages. And now I want to fire some additional tags that send data over once somebody clicks on this link. So first step is to head over to Google Tag Manager. And we go into our variable menu here to activate all our built in variables that we will use. Let’s scroll down here to the click variables, we want to detect the click. And we’re going to activate all of these. All right, it’s saving, and now they should be all activated. And we see them here. Once you click on refresh of our preview and debug mode, if you’re not yet in the preview mode, you can click here on the Preview button. And then on our page, we get this little panel here. And here in the variable menu, we should now see our different variables that we have just activated. Next up, we want to deploy a click trigger. So we can actually detect if somebody clicked on this phone number. So go over to Google Tag Manager under triggers here, and click on new and simply call this click. We’ll change this later on, and go with the just links click trigger. Click on this. And for now, we’ll just save it. And again, click on refresh. Go back to our page, reload that and now we need to activate our click trigger to see what happens here in the menu so I’m just going to click on the link, and cancel this all and we see a link click. So our auto event trigger listens to all the clicks on the page and forwards this on to our tool via Google Tag Manager to register some information. What information is registered? Let’s click on the fifth event and go to variables. And here we see our click variables got filled, not all of them, but at least some. So we’ll be able to base our filter on particular this fifth click because we want to distinguish that our tag doesn’t fire when somebody for example, clicks on the blog here. This would also trigger a link click, but we want to make sure that we only pick up our telephone clicks. So now that we have clicked on another link, we can actually compare what is changing when the user clicks on the telephone number and what is changing when it clicks on the blog link or on any other link. Well, the unique thing about this link click you can see already is that the click text is this phone number to click URL is actually what we saw in blue, the actual HF part of the link. And that is not true. When we go over here, this would totally change. So what we can do is based this of for example, the click URL here, because this is very unique to this particular link click, and it would actually also remain true if you click on any other telephone links that are may be on the Contact Us page. So how would we go about configuring this filter into our trigger? Let’s head back to Google Tag Manager. And we have already our click trigger. Now we’re going to refine this click trigger to only fire on our phone numbers. So I’m going to put this into the name as well and then we’re going to look at the trigger configurations. There are two configurations that you can check you don’t have to check which is the wait for tags option. This is an option that would prevent the browser for up to two seconds, be redirected onto the phone app. For example, in order for the tracking to fire, that’s an option that you have. Or to check validation option. This pertains to the features of JavaScript, whereas callback once the link is actually clicked, that’s something that I want to get too deep into right now. But you can find out more about these features in the help section right here. Once you click these options, you might you need to put in a special condition when you want to start listening for this link clicks. And if you use this option, you might want to to see just all pages, which would be the page path matches reg ex dot star. So I would urge you to try out these options I will leave them unchecked for now because we actually don’t need them always in our tags only in special circumstances when they are false negatives. For now, we want to talk about the filter options here. This trigger fires on and we don’t want to fire on all link clicks. We only want to fire on some links And here we can put our condition in and choose our condition we have talked about before, which was the click URL contains. And then we can just put in a part of the URL, which was this little bit that comes before the phone number. So again, we’re just looking into our click variables here. And finding what makes it unique in our case would be the click URL. And we choose as a unique point here, the tell colon to be included. And every time this is in the click URL, we fire our tag. So with that being configured, let’s save this. And now we have the trigger configured, we won’t be able to see anything in the preview and debug mode. And that’s because we don’t have the trigger it’s connected to a tag. So let’s do this. First, go over to our tags. And we already have our page view tag that finds on all pages. But now let’s go ahead and build an event tag for Google Analytics which fires on our phone number clicks. As a tech configuration, we choose our Google Analytics Universal Analytics and go with an event type right here. And we’re going to type in a category action label in our case, it would be a click to our phone number. And maybe we also want to know which page this has happened on. So which was a variable here, that is our page path. You could change these values around, just make them unique to be able to recognize them later on in your reporting. Then we need to choose where we want to send this all. I have already a variable prepared with our tracking ID right here. If you don’t have that, you can set this up yourself, or choose to enable the override settings and put your tracking ID in here. But since we have this already in a Google Analytics ID, this should do the trick. Now we connect this all with our trigger. Save this, refresh our preview and debug mode. Go back to our page, refresh that. And let’s try this all out. I’m going to click on the phone number. And we see, we had link click, we have open FaceTime. No, we don’t want to do this. But on the Facebook on the fifth link click, we have now our event phone number clicks, to this has been sent over to Google Analytics should be able to see this already in our real time reporting. So I’m going to go over here to real time reporting on the overview. We see we had a page here, but we also have an event. Yes, we have here our event, click phone number. And with our label, or label here is just a slash because it’s happened on the homepage. So again, let’s try this out. Let’s go over, for example to this page. So I’m going to completely different page I’m going to click this button again, and we have our phone number click that happened and Analytics. We now see second phone number click on our event label With a completely different URL, so this is also dynamic. The only thing that’s left to do is to also check the negative so that it doesn’t fire when you don’t want it to fire. So for example, if you have a blog here, I’m going to click on the blog with the command depressed, opens up a new tab, we have a link click, but nothing actually fires on this click itself. So now everything is really set up to datacenter. Your tracking because you have the right trigger, and we’ll find already an event to Google Analytics. What if you wanted to find an event to Google ads? Well, you can just connected with a new tag, we go over to tags, and click your new This is gonna be all Google Ads tag. We’re gonna do custom conversion tracking for our phone numbers. And as a tool, which was Google Ads conversion tracking, then you need to go into your settings of your ads account. And under Tools, measurement, you should find your conversions here. Already in here. You can create a new conversion here. We’re going to go with a website conversion, this is going to be more like lead. So I’m going to choose lead, give this name, which is the same value every time. In our case, just go with one euro, that’s fine. Alternatively, you could also use no value. If this is not something you want to choose, we want to count every interaction, should leave this unchecked, and just create and continue. So we’ll go over to the Google Tag Match option here, where we get our conversion ID and our conversion label. This is something we can transfer over to Google Tag Manager and the conversion ID field. And let’s take the label over as well. No dynamic conversion value, no order ID. And we just connect us again to our already set up click trigger. Again, let’s save this and try this out. Click on the phone number and we now should see that Google Ads conversion tracking files as well. This by the way, within Google ads will only be counted when there was a prior ad click within the Google Ads system. So don’t worry, that it fires every time it will only be counted if the user actually clicked on an ad before it. Now on to our other tool. Let’s go with Facebook ads. So if you’re a new ad manager, you can go over to your pixels. And then you can set up a new event here by installing a new pixel, I also go with the manually adding this code. So here we get the base code. This is something you normally would put into a separate tag. But for now, we’re just going to register this one event. So I’m going to give this all a name. This is Facebook ads, again for an event. And this is phone call tracking, will go with custom HTML this time because there’s no text template into our Facebook quote here. We don’t need this part on here as it’s a no script tag. We don’t want to find a page. On this click but a custom event So we’ll go over to the pixel again. And then the second step, we should be able to manually add our event code here. And we get different standard events. And I’m just going to go with, well today have a lead. Let’s just go with contact here. And here we go, we get the track commands. I’m going to copy that and put this into Tag Manager as well.

We don’t need this part. And this part, it looks good. Let’s attach our trigger again and save this all refresh our preview in debug mode. And we can actually try this out and this new test event mode. So let’s open our website and this new test event mode. Google Tag Manager opens and we click on the phone number. And now we see our Facebook ads fires as well. And our facebook pixel in our test mode event, we see a recent activity on our contact event that just find it. So this also seems to be working just fine. Now you can add your heart’s content, install more tools that would actually get us information about the phone number click if it’s necessary. I just wanted to show the biggest ones here. And in the end, if you are happy with your implementation, don’t forget, you need to actually submit this as a version. So it goes live to your users. Because right now, we have just implemented this on our browser. And it’s not yet live, gives this all a name and then you may publish this to all your users, and it goes live. So this is how you can install phone number tracking with the help of Google Tag Manager.

Hey, it’s me again. Did you enjoy this video? Let me know in the comments down below if you liked it, if you don’t like it, or if you have more questions. And if you haven’t yet, then consider subscribing right over there because we bring you new videos just like this one every week. Now, my name is Julian. See you on the next one.