All articles Doofinder > Blog > Marketing > Google Tag Manager Tutorial: How you can use it to improve your websiteâs analytics (without touching any code) Google Tag Manager Tutorial: How you can use it to improve your websiteâs analytics (without touching any code) Abigail Bosze 6 min CONTENTS Remember when you decided to connect Google Analytics to your online shopâs website? You probably thought itâd be all smooth sailing â until you stumbled upon an incredibly long snippet of code and something about the âheadâ of your template that sounded Greek to you (unless you had some notion of web design). So you probably ended up calling an outside web designer that took less time than it takes to drink a cup of coffee (while still charging you for the full hour of work). And then the same thing happened when you added the Google Ads code. And the Facebook or Snapchat pixel. And so on and so forth. So⊠Wouldnât it be better to do the job yourself and stop being dependent on others every time you connect a web analytics tool to your e-commerce shop? Well, itâll be possible if you start using Google Tag Manager. And in this post, weâre going to tell you what it is and how to use it step-by-step with a very detailed tutorial. This way, you can stop paying your developersâ coffee addictions. đ đ What Google Tag Manager is and how it works To get a solid grasp of it, imagine your site is a building and, in order to access it, each tool uses its own door (its label or tracking code). So every time you want to connect a new tool, you have to create an exclusive door for it (that is, you have to access the websiteâs source code and edit it). However, Google Tag Manager (GTM) allows you to create a âuniversal doorâ to let all tools in. In other words: Google Tag Manager generates a unique code snippet (called a âcontainerâ) to connect any external tool without changing the siteâs source code. This way, whenever you want to use a pixel for SEM, a heat map, or anything else, youâll be able to do it yourself from the GTM interface. Much simpler (and cheaper). đ â Basic Google Tag Manager terms you need to know You might be at a loss now if you donât know much about web design. No worries. Here are a few terms for you to familiarize yourself with to get the most out of this tutorial: Container: the code fragment generated by Google Tag Manager, and the only one youâll need to insert on your website. This is the âdoor codeâ we told you about before. Tag: tags are the references that other tools use to connect to your site. Google Analytics has its own tag; Google Ads has a different one, Facebook pixel another one. Itâs like the ID they use to get through the door. Variable: variables are the instructions tags receive, like âcollect data from the userâs cookiesâ. Weâll tell you more about that later in this post. Trigger: it tells you a tagâs activation event. For example, the tag will start collecting data from a userâs cookies âwhen the page has been fully loadedâ. Now that all these terms have been spelt out, letâs see how you can use Google Tag Manager on your site. đ Tutorial: How to install and use Google Tag Manager The first part is the only difficult step of the process, as you will have to make some changes to the code. Everything will be a piece of cake after that. đ â 1. Installing Google Tag Manager on WordPress To make everything easier, weâre going to teach you how to install GTM on WordPress. If you use PrestaShop, Magento or Shopify (or any other open source CMS) instead, donât worry, because the process is basically the same. âĄïž A. Create an account Like with most Google tools, you must create a user account to use it. To do that, head over to the Google Tag Manager Website and fill in the following information: Account information: name and country. Container: here you have to create your first container. You just need to give it a name (so it can be identified later) and indicate its use (normally âWebsiteâ). Once youâve clicked on âCreateâ and accepted the terms and conditions, youâll be taken to Google Tag Managerâs interface. âĄïž B. Installation When youâre in, youâll first see a pop up with two pieces of code, like this: These are the only two code snippets you need to insert into your website; theyâll act as containers for the tags from the rest of the tools. There are basically two ways of doing it: With the WordPress editor: This involves accessing the file through WordPressâ source code and inserting the code fragments there. We advise against that unless you know exactly how to do it (as you could delete something important). With a plugin: The easiest option is to have these codes inserted via a plugin. There are plenty of them with this option, but you can also use the plugin from Google Tag Manager itself. If youâre unsure, itâs best to ask the developer directly (this will be the only time youâll have to do it). đ Once youâve installed the code, click âSendâ in the upper-right corner of the GTM interface. Itâll show you a window where youâll have to type the name of this version. Every time you make changes to a container (like connecting a tool, for example), the system will create a new version of that container. Finally, click on âPublishâ to activate it. â 2. Installing a tracking code Now comes the time to learn to connect those web analytics tools quickly and easily with Google Tag Manager. Some of them, like Google Analytics, already have a predefined configuration, whereas others require manual settings. Letâs see an example of each. âĄïž A. Google Analytics Letâs first see the process of installing Google Analytics. Click on âNew Tagâ on the Google Tag Manager interface. Youâll see a window where you need to follow these steps: First of all, give the tag a name (so you can identify it if you want to edit it later on). After clicking on âTag Managerâ, youâll see a list with many different options. Choose âGoogle Analyticsâ. For âTracking Typeâ select âPage viewâ (usually the default option). Leave Google Tag Manager open and sign in to Google Analytics. Go on Admin > Property settings and copy the number under âtracking IDâ. Go back to the Google Tag Manager tab and click on âVariable configurationâ and then on âNew variableâ. Paste the code from Google Analytics into âTracking IDâ. Leave âcookieDomainâ on auto. Now weâre going to set anonymous registration for cookies to adhere to the Data Protection Act. To that end, in the very same window, click on âFields to Setâ and add the following fields: Once youâre done, click on âSaveâ. Next, head over to âTriggeringâ to establish when to launch the tagâs variable. By default, the tag will be activated on all the pages of your website once the window has loaded. But you can also click on âNew triggerâ (the â+â sign in the upper-right corner) to add a new filter so that itâs activated only on specific pages (for example, if you only want to measure the traffic of a landing page). Our recommendation is to go for the default option. Once youâve clicked on save, your Google Analytics tag will be up and running. Now letâs see how to install the tracking tag for an option thatâs not on the list. âĄïž B. Facebook Pixel For this next example, weâre going to use the pixel from Facebook Ads. However, itâs the same process for any other tag youâd like to add. First, click on âNew Tagâ and then choose âCustom HTML Tagâ under the configuration options. Then, youâll see a box where you have to add your pixelâs code snippet (you can find it in the Ads Manager section of your ad account. Next, click on âAdvanced settingsâ under the box. Select âTag firing optionsâ and then âOnce per eventâ. You donât need to change anything else. Under âFire onâ, you can choose for your pixel to be fired on all pages of your website or just on selected ones. After clicking on save, your pixel will be ready to record your websiteâs visits so you can launch retargeting campaigns. đ Now you know how to use Google Tag Manager, but why would you settle for only external tools? Thereâs another aspect to web analytics that many of our clients donât take into account. Most of the time, the most interesting data to help your business grow can be found inside your very own website. For example, the stats generated with an intelligent search engine like Doofinder. Want to learn more? Then download this e-book where we explain how you can increase your sales by 20% with an intelligent search engine. And if you want to try Doofinder for yourself, you can get a 30-day free trial by clicking here. Oh! And it works like a plugin, so donât worry about messing around with any source code. đ FREE EBOOK Online Store Marketing Plan READ IT NOW FREE EBOOKS Increase your eCommerce sales by 20% The 10 largest eCommerce sites in the world How to start an online shop from scratch