If you’re familiar with the web analytics world, you’ve probably heard of Google Analytics (GA). But did you know there’s another tool, Google Tag Manager (GTM), that allows you to control and customize how data is collected and sent to GA?

Installing the basic GA script on your website will allow you to capture pageview and traffic source data (and some other stuff too). For a simple site, this can absolutely be sufficient! You’ll be able to see which pages users are viewing most frequently, where they came from (search engine, social media, etc.) and usage metrics like bounce rate, time on page, average session duration, pages per session and more.

However, if you are curious to understand how users are interacting on your site (clicks, scrolling, form submits, video views, downloads, etc.), I would highly recommend installing Google Tag Manager rather than the basic Google Analytics script.
That said, simply installing the Google Tag Manager script will NOT automatically set up Google Analytics nor set up interaction tracking.
In this tutorial, I’ll walk you through how to set up GA via GTM. Once GA and GTM are squared away, setting up event tracking for user interactions will be much, much easier.
TL;DR Google Tag Manager != Google Analytics. In order to set up Google Analytics via Google Tag Manager, you must publish a page view tag pointing to a Google Analytics tracking ID.

If you don’t already have a Google Analytics account, create that first and note the tracking ID. Here’s a handy link with info on how to do that. Also, if applicable, be sure to remove the legacy GA tracking script when you install GTM to prevent double counting hits.
Create a Google Tag Manager Account
First, create your GTM account at tagmanager.google.com. Look for the light blue Create Account button and fill in the information about your account. A ‘container’ is where you’ll build and store tracking tags (in tech speak, the container becomes the JavaScript file GTM loads on your site). I’m only going to focus on web tracking for now so select Web as the target platform.
Install Google Tag Manager on Your Site
Head over to the Admin tab and click Install Google Tag Manager. This is the unique code pointing to your GTM container that needs to be placed on every single page of your website according to the instructions.
If you are not working with a developer and manage your own site through a CMS like WordPress or Squarespace, look for the settings which allow you to place custom code in the header or footer and place the GTM script there. The header is preferable, but I won’t tell anyone if you put it in the footer (I have the GTM script for my own website in the footer, YOLO). You can also just Google how to install GTM on your respective platform (LMGTFY).
Configure Built-In Variables
Back to GTM! First things first, let’s configure the built-in variables. Just check all the boxes. Go nuts. This isn’t necessary to install Google Analytics, but it’s best to set it up in your GTM container now for future tracking needs. Might save some headache down the road.
Create a Workspace
Now let’s create a new workspace. A workspace is the set of changes that become a new version once published. Using a workspace allows you to test and publish changes independent of any other workspaces where there are changes still in progress. That may not sound like much now, but once you get into the weeds of GTM you’ll realize how useful this is!
In the top left corner of the screen, under Current Workspace click to expand the white box, then click the blue plus sign in the top right corner to add a new workspace. Title the workspace whatever you want (maybe something like, GA set up) then click save.
Create the Google Analytics Page View Tag
In the workspace you’ve created, click New Tag. Title the tag UA – Pageview. The UA stands for Universal Analytics and the common naming convention for GTM tags is: {Type of tag} – {Description of the tag purpose}. Click within the Tag Configuration box and choose the tag type Google Analytics: Universal Analytics.
Next, select track type Page View. Within Google Analytics Settings, select New variable… from the drop down menu. This is where you will add the tracking ID from Google Analytics, which essentially tells Google Tag Manager tags where to send the data from your website. Click save.
Look for the second white box underneath Tag Configuration titled Triggering and click inside the empty box. Select the only trigger that exists, All Pages, then save the tag.
*~ QA Time ~*
Now it’s time to test the tag and make sure it works. Google Tag Manager is a very powerful tool and it’s important to always QA tags before publishing. GTM can and will break your site if you aren’t careful, particularly when deploying custom scripts.

In the top right corner of the GTM interface, click the white Preview button and wait for the big orange box (below) to appear. Then, go to your website (where you should have already installed the GTM script on every page) and refresh the page. Refreshing the page deploys the newest ‘previewed’ version of a container. Always refresh the page of your website after previewing new changes from GTM.

You should see a panel pop up at the bottom of the browser window. If not, GTM probably wasn’t installed correctly. You can confirm this by using the Google Tag Assistant Chrome extension (and if you aren’t using Chrome…well the world would be a better place if everyone just used Chrome).

Within the GTM debug panel, you should see the pageview tag you created in the summary of tags fired on this page. “Fired” is another way to say “the script ran.” Navigate to a few other pages on your site to confirm the page view tag is firing every time the page loads. If it does, great! You have successfully QA’d the page view tag.
Publish…That…Page View Tag!

Back in GTM, you’re ready to publish! Within the workspace where you created the page view tag, click the blue Submit button in the top right corner. You can then modify the version name or add a description if you like, this is particularly useful for record keeping when multiple changes are published in a workspace. Then click Publish.
Congratulations! You’ve officially installed Google Analytics on your site. If you want to double check everything is working fine, you can either preview an empty/default workspace in GTM (which reflects only published changes) to confirm the page view tag is still firing or use the Google Tag Assistant Chrome extension to confirm GTM and GA are installed correctly.
If your site sees consistent traffic, you should start to see data in Google Analytics within a few hours. And yes, unless you have filters set up to exclude your own visits to your website, your own visit data will show up in GA. But, the good news is I can also show you how to set up basic filters in another post.
And if you’re the type of person who likes to read material from multiple perspectives, here’s a link to Google’s documentation for this same process.