What Are Built-In Tags in GTM and How Are They Useful
Pre-built tags that come out of the box with Google Tag Manager – What are they? How to use them.
You’ve just learned a ton about tagging your site with Google analytics and what are all the different examples and third-party features that you can really learn more about and pushing the analytics and use for your optimization program. Now we’re going to start diving into marketing tags. We’re going to look at our prebuilt tags, custom HTML tags, custom templates. We’ll eventually move to AdWords and Facebook tags, but for this episode, I’m going to focus on prebuilt tags that come out of the box in Google Tag Manager.
One thing to note is the prebuilt tags as we know them today are really becoming a close cousin to our templates. Templates have a prebuilt library as well. I’m going to go through templates, as we really see the industry and Google moving in the direction of templates over time. What you’ll learn in a little bit, you can see a few examples that we have set up here.
So tags. What are prebuilt tags? When you log into your Google Tag Manager account, you’re going to have your overview and then ultimately your tags, triggers, and variables that we’ve seen quite a bit so far. If you are wanting to add a new tag, you don’t necessarily need to start from scratch. Google has done a great job over the last couple of years of bringing in new third-party partners and making their sitewide script and all of the requirements for variables et cetera that those third parties ultimately need sent back to their site. They’ve pulled that in to prebuilt tags that are available to make the process of you implementing a new marketing pixel not just a sitewide tag but all of the potential custom events, like viewing a product, adding to cart, et cetera, making that process really fast. When we are looking at a new tag type, you’ll see we have our featured section, which is going to contain all of our Google prebuilt tags.
What we’ve looked at already a few times here is our Google analytics universal analytics tag. You can see this is a prebuilt tag. We have the different track types of page view or event or transaction. And really the only thing that you would need to do here is just set the variable for a page view tag and set the trigger, and you’re on your way.
The same would go for AdWords, which we’re going to go through in a little bit here, going through our AdWords tracking, Google ads remarketing to the remarketing prebuilt tag that exists in Google Tag Manager. There’s a couple variables here. There are some options to customize this prebuilt tag. So, for example, if you wanted to manually specify a parameter for a remarketing tag, you’d do so here. Again, I’m going to not go too deep into the Google Ads tagging, as we’re going to go through that in its own episode.And then the last couple here would be Floodlight prebuilt tags, Google Optimize, and the conversion linker. So these are all the featured prebuilt tags that Google has that, again, makes it very easy to get their own properties up and running.
But then we have some others, if we just start scrolling down a list here, you’ll see some of the other prebuilt tags. Let’s say that you signed up for Hotjar, which is a very common heat mapping tool, and their onboarding process gives you a script, so a sitewide script. They’re like, “Hey, grab the script, go find a developer or copy it into the top of your head on every page of your site. When that’s done, come back, and we’ll test and validate to see if the script is firing.” So with Hotjar being part of Google Tag Manager, if you already have Google Tag Manager running on your site, then all you’d need to do here is select the tag type of Hotjar, grab your Hotjar ID, your site ID, enter that here, add your trigger.
In this case, if I want to just add an all pages trigger, I can do that. This is probably one of the more basic tag types, and you have the same options that we’ve looked at before with tag firing priority. If you wanted this tag to fire higher on the page, you can do that, and you can set other custom sequencing and tag firing options on this.
Now if I go ahead and save our Hotjar sitewide script, and if we pop over here to our test store. And we’re going to put GTM into preview mode here. At this point, Hotjar does not exist in my account. You can see, we just created this Hotjar sitewide tag a few seconds ago. Now with GTM in preview mode, we’ll go back to our site, reload the page and you can see with GTM debug, we now have Hotjar firing on every page. If I navigate to another page, you’ll see that we have Hotjar executing just as we’d expect. So you can see, super simple. Grabbed Hotjar, entered my site ID, and I’m off to the races.
Another example would be Twitter. If you were starting with marketing on Twitter, then we can add a Twitter tag. So, again, we can scroll down just to see all of the different options here. And you’ll see other common marketing channels like Pinterest, Quora, and now we finally get down to Twitter. This is a prebuilt tag that is a little bit more complex than what we looked at with Hotjar. Let’s rewind to the tags, triggers, and variables episode where I talked through you don’t think about the tag first and then the trigger, then the variable. Where we think about a variable that needs to exist, that’s really the foundation, and then we have triggers that are ultimately using those variables. The example we talked about was product page view. So a product page view is firing based either on a page URL that has products in the URL or a custom event, like product detail view event.
And then, from there, we have the tag where the tag is being assigned to a view content, which would be product view, and then we’re also adding in additional parameters that are variables. If you’ve done the work already of configuring your store with a very robust data layer, plug for our Shopify GTM Suite app, of course, then you have the majority of the variables that you’re going to need for your store and ultimately plugging into these marketing tags. You have your variables and then you have your triggers. If you have either imported our container that contains the tags, triggers, and variables, you’re going to have the triggers and the variables already created for you inside your Google Tag Manager account. And when they are there, or if you’ve created them on your own, if you have your own data layer as well, that’s fine, too. But if your variables already exist and you have the requirement of implementing Twitter and the different events that go with a Twitter tag, now all we have to do is in your event parameter select what parameter you want to associate to this tag.
Let’s say this is a product view, we’ll do the content IDs, which is a product IDs associated with a purchase, but in Twitter’s case, this can also be used for product page views. And then here, we’re just going to do our lookup for our variable. We’ll just scroll down to our product view, and now we have skew, the skew variable associated to our content ID parameter name after we entered our pixel ID. The only other thing that I would have to do here is add our product detail view trigger. We have a product detail view trigger. We have an example of a parameter here, which is associated to a variable. Let’s look at purchase, if we want to add a purchase, we can look at the value of the purchase. Our event parameter here is going to be our revenue. We have our thank you page revenue. We’ll add another one. We’ll do our order ID. Now we have a Twitter purchase tag with our pixel ID, three parameters. We can change this trigger to our transaction complete. That’s it.
Now that I’ve saved this, what I like to do generally is probably not start with purchase first, but you can go into a prebuilt tag, click copy. Make a copy, and we’ll do the product view. Twitter product view. Our tag event is going to be view content. I’m going to delete the value and order ID and just leave our content IDs, change our trigger. There we go. Now we have our Twitter product view, tag type Twitter, pixel ID. You can turn this into a variable, if you put your Twitter pixel ID into a constant variable type, then you can just set this variable on everyone. If you wanted to create a new Twitter ID, we’ll do our variable configuration for constant. Now we’ve made this even more foolproof, where we can just change the variable, the Twitter ID once in a variable, if this is set in all of our different prebuilt tags.
That’s a very easy way if you start with the foundation, you have your data layer built, you have your set of triggers. So your common triggers are going to be like your product view and your add to carts and all of that. And then you need to implement a marketing tag. Chances are, they could exist as a prebuilt tag that you can just add, and you don’t have to go through the legwork of grabbing the script and then swapping out the script. Then once you’re done, you can go through the same process that you’d go through with the behavior event tracking, is you can just refresh, and we’ll go over to the front end, you can see no Twitter tag here, which is what I expect. If we go to a product page here, you’ll see we have our Twitter product view, and you can see our skew has made its way into the event parameters.
I love prebuilt tags. Many of our library of GTM recipes utilize prebuilt tags, it makes things very fast. It’s going to be a transition to custom templates, which I’ll go through momentarily. But if you have 10 marketing tags that need to be implemented on your site, chances are five or six out of those 10 likely exist in a prebuilt tag that’s going to make that process even faster for you to get up and running, assign the variables, have all the right triggers, have full coverage of all of your custom events, and then really minimize that process of having to go back and forth to make sure that the tag has the right script and is the latest and really save you from the headache.
We’re going to talk a little bit more about custom HTML tags, custom images, and custom templates as we continue going deeper into our marketing tag management in GTM.