[Complete Training] Facebook Pixel Tracking with Google Tag Manager (2020 Version)

Ahmad Kanani from Siavak Analytics is back in our channel to give us a complete Training on how to install the Facebook Pixel with the help of Google Tag Manager.

In this video, he will go walk us through the 3 different methods you can do which are

  1. Automatic Installation
  2. Advanced manual Installation
  3. Facebook Pixel Custom Tag template

Continue…[Complete Training] Facebook Pixel Tracking with Google Tag Manager (2020 Version)

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:

https://support.google.com/tagmanager/answer/7683362

 

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.