If you are a marketer or entrepreneur, Google Tag Manager is one of those tools that can make your life easier.
Google Tag Manager (colloquially known as GTM) is a script (or tag) management system that allows you to install tags, scripts and other helpful snippets of codes to your website directly.
One of the main reasons to use it is that you’ll no longer need to rely on your developer to install code to your site, nor waste time going to the backend and doing it yourself. In other words, once you install Google Tag Manager’s script on your website, you’ll be able to quickly install other Google tags like Google Analytics, or third party scripts or pixels like HotJar or Facebook’s Pixel. Once you install tags, Google Tag Manager has a preview option, which will allow you to make sure your tags are being “fired” correctly before making any changes on your website.
It is especially useful if you like testing new things on your website. For example, if you are a business owner interested to know how your users interact with your website, you can use Google Tag Manager to install HotJar’s code. You can choose if you want to keep track of one page of your site or all of it, depending on how you set it up in GTM. If you use Klaviyo for your email marketing, you can install its tracking pixel using GTM as well!
Additional benefits of using Google Tag Manager include faster loading times, improved SEO performance and conversion rates, more accurate analytics and much more.
How to Use Google Tag Manager with Facebook Ads
As mentioned previously, Google Tag Manager works very well with Facebook Ads. If you are running campaigns, you will not only need to install the regular pixel, you’ll need to install bits of code, known as event codes, to tell Facebook that a certain action or pageview counts as a conversion. Traditionally, you’d need to install the bit of code on all the pages, but with Google Tag Manager, you’ll be able to tell the bit of code to fire wherever and whenever you need it.
If you do not tell Facebook which actions are valuable to you through event codes, Facebook will not be able to help you optimize your campaigns. In other words, it won’t be able to serve your ads to the audience that is likely to perform the action you need at the lowest cost.
IMPORTANT: In some ecommerce platforms like Shopify, there is a way to install the Facebook pixel by simply adding your pixel’s ID in your settings. We highly recommend installing the pixel that way (as opposed to through GTM) because of the useful data that these platforms pass back to Facebook, like your items’ purchase values.
Follow these steps to install the Facebook Pixel (skip to step #6 if you have already created an account):
- Create a FREE GTM account if you don’t have one here.
- Enter your company’s name under “Account Name” and click continue.
- Enter your website’s URL, selecting “Web” for where you want to use the container, then click on create.
- Read the agreement and click on the yes button to continue.
- The first time you login, you will see the code that you need to get your developer to install. If you don’t feel like you need your developer, feel free to install it yourself! If the code doesn’t show up for you, you can always find it under the admin tab by clicking on “Install Google Tag Manager” on the container side.
- Go to your Facebook Business Manager > Click on the burger menu > All Tools > Pixels.
- Create your pixel if you haven’t already and copy the base code. It looks something like this:
<!– Facebook Pixel Code –>
fbq(‘init’, ‘000000000000000’); // Insert your pixel ID here.
<noscript><img height=”1″ width=”1″ style=”display:none”
<!– DO NOT MODIFY –>
<!– End Facebook Pixel Code –>
- Go back to your Google Tag Manager workspace.
- Click on “Tags” on the side menu.
- Click on “NEW”.
- Name your tag.
- Click on “Tag Configuration”.
- Scroll down to where it says “Custom” and click on “Custom HTML”.
- Paste the Facebook Pixel in the white canvas.
- Scroll down (if you need to) and click on “Triggering”.
- Select “All Pages”.
- Click on the “Save” button.
- Find the submit button on the upper right corner and click on it.
- Lastly, click on “Publish”.
Now that you have successfully installed the Facebook Pixel, you’ll need to tell Facebook which events are important to us. These are called “event codes” and they’ll allow Facebook’s algorithm to optimize your campaigns based on these events (depending on your campaign’s objective).
As an example, we’ll use the purchase event. We’ll follow almost the same steps as setting up the Facebook Pixel but with a small caveat; we’ll use another trigger. Follow steps 11 – 15, pasting the following event code in the canvas for step 13:
In the “Choose a trigger” window, you’ll need to click on the “+” (plus) sign on the upper right corner. Name your trigger and click on “Trigger Configuration”. Select “Page View” and the “Some Page Views” button. Assuming that you have a thank you page of some sort, you’ll need to enter its path like this:
Save, submit and publish if you think everything looks good. If not, enter preview mode (next to the submit button), go back to your website and do a test transaction. You should be able to see the GTM bar like the one below throughout your transaction.
If everything looks good there and your tags are firing, be sure to leave preview mode in your Google Tag Manager dashboard and publish your tags!
Google Tag Manager + Google Analytics = Awesome
Perhaps the best thing about Google Tag Manager is that it works extremely well with Google Analytics.
Ever wondered how to figure out how many people download your pdf? Or where on the site they downloaded them? Or if they watched your video?
With Google Tag Manager, you are able to send events to Google Analytics. If you so wish, you can then set those events as goals, which show up in your Google Analytics dashboard. An example of some events you can track include clicks (i.e. clicks on buttons, videos, pictures, links) and form submissions.
To create an event viewable in Google Analytics (Behavior > Events), within Google Tag Manager you’ll need to:
- Create a new tag.
- Select “universal analytics” as the tag type.
- Name the “Category” and “Action” (label and value are optional).
- Check “Enable overriding settings in this tag”.
- Enter your Google Analytics tracking ID (click here if you don’t know where to find your GA ID).
- Select the trigger that fits your needs (i.e. click trigger).
- Edit the trigger like the image below.
- Save, preview, submit and publish.
Whether you are an entrepreneur, a seasoned business owner or a marketer, Google Tag Manager can be an integral part of your utility belt. It can help you test scripts quickly without the need of a software developer or complicated content management systems. Not to mention, it keeps all your third party snippets/pixels organized in one secured place. To learn more about how Google Tag Manager can be used to help market your startup or sell your products, get in touch today.