Organic Searches Digital Marketing Agency

7 min to read 

Configuring the GTM  

What’s going on guys? Welcome back to another guide. I’m going to show you how to use the Google tag manager to configure your Facebook pixel.  We’re going to go in depth and I’m going to teach you how exactly to do that. 

Right now I’m looking at a screen of different accounts each one with one container. And so, you know think of a container that it is basically a site, you know, like you can have a site or a specific project that you’re working on at containers basically a collection of tags and triggers and all these settings basically a collection of code. I’ll keep a single simple collection of code and variables that get executed in response to certain events. 

Let’s go from the beginning and create a new account. So we’re going to create a new account from scratch. We’re going to click create we get the screen and let’s say we call this account three., okay, because I already have two accounts. We’re going to call it the count three and we just put Ok now countries us. We’re located in the United States. We pick here web. We click create we accept the terms of agreement. and we should have an account created now right away. We get a new screen and I’m going to remove this for second and we have this something called the Google tag ID.  

Now this is very important because this is kind of the identifier for this particular account for this particular tag, even this workspace. Okay, and what we see on the left hand side, we have an overview where we are right now. We have different tags triggers variables folders and templates and most important thing here is tags and triggers and so the way of which would think about is it that is a piece of code that runs in the response to something. So for instance, you know, if something happens if an event happens, which is a trigger, think about it like an if-then condition if something is triggered this piece of code executes. We don’t have any tags and this particular account and this particular project and that’s what we need to create right now, and we also don’t have any triggers as well because we haven’t created any triggers yet. We need to basically create a tag called Facebook pixel, which is going to insert a piece of code that is going to get displayed. But before we can even start to configure all of this It’s important to configure Google tag manager on your own side.  

Installing Google tag manager on your Wordpress site or Shopify 

So there is there’s various ways of doing it. You know the it depends on the platform, I believe if you have a Shopify, there’s a plug-in or maybe it’s built in. I haven’t you Shopify and a while, but for this example, we’re going to be using Wordpress and WordPress actually has a really good tag manager plugin if you go to and you search for Google tag manager plug-in, you will see this plug-in right here Google tag manager for WordPress. And this is the easiest, it’s a simple plugin, it’s the most popular of plugins so it works. What you do is you install it on your side, set up like any other plug-in. 

Connecting the tag so they communicate 

 Then once you do that, you’re going to have a setting here in your WordPress admin and you’re going to have Google tag manager id then on the first page on the first tap, tap the general tab, it’s going to ask you to insert your Google tag manager id. This is the ID that we have here.  

Really this whole code right here is going to get inserted on every single place. Now, of course, you don’t need to use a WordPress plugin. You can insert it manually if you know if you’re a developer you can. You can insert it manually in the head section where Google suggest and then insert this piece in the body section, or you can use like a plug-in called like header footer where that allows you to insert this code, now we are going keep it simple. We install this plug-in. We just installed this piece of code, and we’re good to go. 

Google Tag Manager is going to get executed in every single page now. We can work inside this and never have to touch our WordPress installation ever again. Which is fantastic because if you ever lost a website or decided to fire it up again you just repeat this process again since its already saved and you are done!  

Save Time and find a Google tag 

The first thing we have do next is we need to find a tag, the Facebook pixel that executes the Facebook pixel code. In the past you had to create your own tag and do it from scratch but now Google introduced something called that tag template. Click on that and we click and search Gallery here. Basically, you are presented with a list of different templates that you could use that are submitted by third parties obviously there’s a little bit of a security issue.  So, you have to make sure you trust this party. So, you know, some of them have this green check marks that it’s verified by GitHub. 

What you got to do is you got to click this magnifying glass type Facebook. We click add to work space and it gives us some warnings and obviously, you know, it’s going to inject a script.  This is a piece of code that we’re actually going to run on our side and we click OK because we trust this code. Now this template, this Facebook pixel is part of our own templates but we haven’t installed it yet. We simply imported a template. 

What we have to do next is click on the tag and we need to modify the tag. Click the Fb pixel we just added. 

Click new and now we can click on this tag and configuration here. Now we can take our Facebook pixel and now since we imported the template we are not working with a template. We’re working with the actual tag; we click on this and now we have this tag configuration. The first thing I like to do is give it a name we can call it Facebook pixel. 

Configure the FB pixel 

You have to configure it next, the beauty of these tasks and these templates is that you no longer need to actually create any code and you no longer need to copy/paste JavaScript code. It’s going to do it for us. The first thing we need is the Facebook pixel and for that we go back to our business manager depending on where you are you need to go to events manager and click the menu. 

You have to click on the events manager because that’s what the pixel is it basically generates events. You click on the events manager, and then you have a list of pixels. Next if you need to create a new pixel you click on this follow instructions as show in the image, email instructions to developer or manually install a pixel.   

Create a pixel ID for GTM 

All we need is a pixel and once you do all that it will create a pixel ID and you basically click on that. You go back to the tag manager, you go to the Facebook pixel tag, you copy and paste your Facebook pixel ID. 

Connect a tag to a trigger in GTM 

Next you check any other options, under the Standard radio box we have event names which are standard events. Standard events are basically pre-configured events, or we can do a custom event. For this example, we’re doing standard events, and we’re going to fire page view event, which is basically what a pixel does by default. It always fires a page view, that because it’s installed on the page and every time that page gets viewed, they know somebody views that page and this page view gets triggered and we click save. 

GTM is telling us that there are no triggers selected so remember this is an if-then condition we have a piece of code, but we don’t have a condition where it’s going to fire so what we do is we add a trigger and thankfully this is the only built-in trigger we have and this is the one we need for all pages.  

Going live with our trigger and event 

We click on that now we have a trigger. We have a piece of code on all pages this piece of code is going to get fired the click save. and now we’re back to the dashboard. It has not implemented the code yet. It’s not live yet. It’s telling you that you have workspace. You have worked space changes to and you have to click submit. We click publish. We don’t really need to enter anything here. You can if you’d like, but I usually don’t I click continue. 

Your GTM and pixel are live. We have version 1.0 with one tag. This top page tells you whatever changes in that version. These are the tags. These are the triggers. We have all the history of the change that we did. Later on, we’re going to add new tags. We’re going to add new pieces of code. Maybe find who it is or something else and so you can even go through different changes and this will keep track of those changes as you add people or revise new code changes. 

Creating a Conversion Event 

We need to create another tag another piece of code that’s going to track conversions and that’s only going to get fired on our thank you page. Okay, so what we do is we go to tags we click new, we call it purchase event and this event is only going to get fired whenever we have people on the thank you page.  

After you purchase a product that person is redirected to thank you page where maybe they can download this product or they get an email confirmation about that the product if it’s a physical product. If it’s going to get shipped or its on their way. So it’s a very common practice to redirect people to a thank you page once they make a purchase or after they book something. In this case, what we want to do is we want to use the same pixel.  

We click on this choose tag type. We go scroll down go to our custom tag. We have custom HTML, Custom, Facebook pixel. We click on that. We put the same pixel ID. We copy and paste our pixel ID.  We pick a different event now if you’re using standard events, then you just pick purchase.  

We want to make sure it’s loaded not firing. What we’re going to do is we want to say fire before we want to fire a standard event, this is our regular event type on Facebook.  

It’s going to get fired after the other previously configured tag gets fired.  Click save now. It’s telling is we don’t have a trigger now. This is very important. Let us click triggering what we want to do is we want to click the plus sign. Okay and create a custom trigger and this is only triggered only for thank you pages. 

Okay, and we click here. And what we want to do is we basically do page view here and we do it for some pages not all page. Use we use the page URL contains /Thank you. So as long as your page URL has a thank you in it this trigger is going to get this trigger. We click save. 

Now we have two tags the regular Facebook pixel that gets fired on all pages and purchase event that gets fired only on the thank you page. 

Okay, and we’re published and so we’re in version 2.0. Now we have two tags, one trigger.  

Did you learn anything new? Subscribe to my email newsletter or follow us on Facebook 

Leave a Reply

Your email address will not be published.