Hey there and welcome back!

If you’re serious about getting into the digital tracking realm with your website to see how people are using your website so that you can make it better so that you can increase conversions, you’re going to be needing to add a lot of different tracking codes and code snippets in your website. And a lot of time that code’s going to be JavaScript that needs to be placed somewhere inside of your website’s files.

Now, you could do that by hand or you could use Google Tag Manager to save the time and effort for you. Tag Manager allows you to add different tags, from Google Analytics to other third-party software to your website without having to touch any code. And you can customize those tags to only load when you need them too. Plus, it just makes it easier to keep them all organized.

So today let’s take a look at what Google Tag Manager is, what it does and how you can create your first set of tags.

And before we begin, if you want to see more videos about Google tools, web accessibility, ecommerce, digital marketing, and other website related topics, be sure to hit the submit button and to ring the bell for notifications.

Now let’s get started.

What are tags?

Tags in Google Tag Manager are little snippets of JavaScript that Tag Manager adds to your website. These can range from a Google Analytics tag that collects page views or event information to third-party services like Crazy Egg and Hot Jar.

Normally with these tags, you would have to paste in the JavaScript code into your header yourself. But the main feature of Tag Manager is that it does that for you. You simply use its interface to create the tag you want or need and then it inserts that tag into your website automatically. There’s just one piece of JavaScript code that you need to insert into your website for all of this to run.

But that’s it. That’s the magic of Google Tag Manager.

Getting started with Google Tag Manager

Getting started with Tag Manager is pretty simple. When you get on the landing page, you’ll sign in with the same account you have your Analytics with. Next you’ll create a container under the account. I recommend naming it the same as your website.

Once that’s created, you’ll need to connect the Tag Manager account to your website. You’ll go to Admin -> Account -> Container and hit Install Google Tag Manager. The screen will show you two sets of code that will need to be added to your website in a similar fashion to Analytics.

Again, if you are running a WordPress website, you can use the Google Site Kit plugin to connect your website to Tag Manager without touching any lines of code.

Once you’ve got that code on your website, you’re ready to start working with Tag Manager.

Creating your first tag

Okay, so now that we’ve got Google Tag Manager up and running, let’s start out with a very simple tag: Google Analytics.

First, we’re going to want to create a couple of our own variables for this. So from the dashboard, click on “Variables”. Then scroll down to “User-Defined Variables” and hit “New”. When the modal pops up, hit the center section to select a variable type. We’ll then select “Google Analytics Setting”. Then enter in your Analytics tracking ID where it says to, hit save and then name the variable.

Now, if you’re using WordPress, you’re also going to want to create a DOM Element variable to keep tags from firing when you’re logged in. So repeat the process above, but select “DOM Element”. Set the selection method to “CSS Selector”, element selector to “body.logged-in” and attribute name to “class”. Then hit save and name the variable.

Now we’re ready to create our Analytics tag. So, hit “Tags” from the dashboard and select “New”. Then add a tag configuration and select “Google Analytics: Universal Analytics”. Keep “Page Views” as the track type and then select your Analytics ID variable for the Google Analytics Settings.

Next we need to add a trigger for this tag, so go back and add a tag. You’ll want to select Page View – DOM Ready. If you’re using WordPress, check the “Some DOM Ready Events” option and in the area that appears select your WordPress logged in variable, “equals” and then “null”.

When you’re ready, hit save and then save the new tag and name it.

Now you have your brand new Google Analytics tag, but we’re not quite done. We still need to publish it. In your dashboard, hit “submit” in the top right corner and follow the steps to publish your tags. When you’ve done that, you’re now rolling with Tag Manager. Congrats! 

Also make sure that you remove any analytics code that you have on your website so that you don’t count visitors twice. I might be speaking from experience.

Creating an internal link tracking tag

Another tag that I like to have is internal link tracking. This allows you to see what internal pages are being clicked on and from what page. It’s a pretty rudimentary way to piece together a flow chart of traffic.

But in order to do this, we first need to add in a built-in variable. To do that, we go back to “Variables” and then hit “Configure” in the first section. Then check “Click URL” and “Page URL”.

Now we go back to “Tags” and add in a new tag. For this, we’ll once again select “Google Analytics: Universal Analytics” but our track type is going to be an event. Our category will be “Internal Link Clicks” (which is how we will find it in Google Analytics). The action is {{Page URL}} and the label is {{Click URL}}.

Now we need to add in a trigger. For this, we’ll use “Click – Just Links” and then select that this trigger will fire on some link clicks. And then we’ll make sure that the Click URL contains our domain (like jacobmartella.com).

Then hit save all the way back through, name the tag and then publish your changes. If you have steady traffic to your website, you should start to see the “Internal Link Clicks” event category inside your Google Analytics data starting tomorrow.

Other tags you can create

But it doesn’t stop there. There are a multitude of other tags that you can create with Google Tag Manager.

Have an account with HotJar or Crazy Egg or some other analytics tracking company? You can use those third-party tags included in Tag Manager to add in the tracking code without having to touch any code.

On my website I also have tags set up to track how far people scroll down the page and how many people watch a YouTube video on the site, which video they watch and how long they watch it. I went through how to create those tags in a post which I’ve linked to in the description below. 

There’s a whole lot more you can do with Google Tag Manager. And we’re just touching the surface here. But it’s something that is completely worth exploring more.

I highly recommend that you play around with it and check out some great resources and do more research on it. The things you learn from it could help your business grow online!

So that’s Google Tag Manager in a nutshell. And what questions do you have about it? Have you used it before and what was your experience like? Be sure to leave your questions and answers down in the comments section below.

If you want to see more videos about Google tools, web accessibility, digital marketing and other website related topics, be sure to hit the submit button and to ring the bell for notifications.

Until next time, I wish you and your business the best of luck.

Links

Timestamps

  • 1:03 — What are Tags?
  • 1:42 — Getting Started with Tag Manager
  • 2:23 — Creating Your First Tag
  • 4:19 — Creating an Internal Link Tracking Tag
  • 5:26 — Other Tags You Can Create