Google Tag Manager | Custom Templates *

OFFICIAL GOOGLE DOC: https://developers.google.com/tag-platform/tag-manager/templates

https://support.google.com/tagmanager/answer/7582054?hl=en/

https://measureschool.com/gtm-custom-templates/

Custom Templates in Google Tag Manager – Fully Explained

 

These templates extend Google Tag Manager in so many different ways. So I asked my friend Kevin Hagg from Bounteous to come on the channel to talk about Google Tag Manager templates because he has written a very extensive blog post on bounteous.com. Now, I must admit, bounteous is one of my go-to resources when it comes to Google Tag Manager. When I got started with Google Tag Manager, I read their blog incessantly. And I also got a lot of inspiration to make these videos. So big shout out to Bounteous.

If you haven’t checked them out yet, please have a look in the description down below where we have them linked up as well. But back to Google Tag Manager templates because we got lots to cover. So Kevin, take it away. Thanks, Julian. And Hi, everybody. My name is Kevin Hagg and I’m an analytics tech lead at Bounteous. Today, we walk through the recently introduced feature in Google Tag Manager, the Custom Templates. Before we get started, let’s take a look what templates are currently available in GTM.

What Templates are Currently Available in GTM?

Once you create a new tag in GTM, you have a variety of tag types to choose from. Google tag manager has long supported the three native tag types featured for Google tools like Google Analytics or Google Ads. Custom, the tag type for inserting your marketing pixel if there are no supported templates in GTM and more. In this category, you’ll find third-party tags from approved vendors.

While we may have many different vendors in here, you’ll notice we don’t have a tag type for all the Martek solutions out there in this list. For instance, I don’t see a template for Facebook, or for Salesforce, for example. Even for some texts that we have in here, like this LinkedIn inside tag, there may be limits for how we can use it. Well, what do you do with a tag you want is not available?

In the old days, you’d go ahead, you copy the code, and you either paste it into a custom HTML tag or you paste the URL into a custom image tag. This introduces extra complexity and actually adds risk to your site.

What Are GTM Custom Templates?

But now, there’s a better way. In May 2019 GTM introduced custom templates. These are standardized templates built by the community and martech companies and introduce them more rigid and secure way of tracking than just pasting the code into the custom HTML tag.

Custom templates are more official encouraged best practices. And we’re thrilled about what this means for the GTM users. First off, anyone can create a custom template, either for variable or for a tag, just by clicking New. I won’t go into much detail today about creating a custom template. But if you’re interested, I wrote a blog post talking about the full building process on the Bounteous blog.

The link to the post is available in the video description. However, most GTM users won’t need to create their own templates. The biggest benefit to GTM users will likely come in using and sharing templates that others have created. So let’s look at that process.

Take LinkedIn inside tag that I mentioned earlier. If you’re running any sort of LinkedIn campaign to drive traffic to your site, you will want to make sure you’re able to measure how they’re performing. In GTM, we already have the site-wide inside tag that fires on every page and enables you to define URL based conversions. But when there is no unique URL, you have to fire an event-specific pixel. To make this easier, we created a custom template for you.

Where to Get Custom Templates

Keep in mind that this is a template built by Bounteous and not an official template from the LinkedIn Corporation. You can get a template from anywhere, someone can email it to you, you can download it on a blog, or in this case, you can get it from the current best option GTMtemplates.com.

This site is a community-supported portal created by Simo Ahava and David Vallejo. We will put the link to the site into the video description as well. In here, you’ll find templates for Facebook, Yandex Metrica, LinkedIn, or Pardot.

And I’m really excited to see what else gets created in the future. Now let’s go back to my LinkedIn example from earlier.

Download, Import and Use a Custom Template

On the detail page, with one click, we can easily download the TPL file, which is our template file. Now the file is downloaded. Let’s go back into Google Tag Manager.

To import a custom LinkedIn template, let’s open the contextual menu and import the .tpl file. Now, we can either test our template by using the preview mode, or we can save it right away. In this video, we won’t go over the underlying code and the template creation process as mentioned earlier. So let’s hit save for now.

The LinkedIn event tag is now part of your available Google Tag Manager tag types. Let’s verify that. Go to tags. Let’s create a new tag. And you will find your template under the custom section. Let’s use our custom template to build our first LinkedIn tag. Let’s fire this LinkedIn tag on a form Submit.

I have to insert two values here, the partner ID and the conversion ID. You’ll find both values in the LinkedIn campaign manager. To make my life easier, I store the partner ID in a custom GTM variable. So I don’t have to copy and paste the same code over and over again. For the conversion ID, for now let’s say random string like 1234.

Now, let’s choose the appropriate trigger. I already created a form submit trigger. So let’s apply that to the tag and save our LinkedIn event tag.

Now we’re almost ready to go. As always, make sure you QA your tag before you publish. As you can see, most users will benefit from using templates that others have created and shared, they’re less risky and more user-friendly than pasting in custom HTML. I encourage you to explore the galleries of options and to leverage custom templates also in your GTM container.

If you’re interested in creating your own or want to know more, check out the posts I’ve shared earlier and made sure to read Simo’s comprehensive guide. Both are linked in the video description. Lastly, thanks to all the companies and individuals that have contributed so far. I can’t wait to see how custom templates evolve. Now back to you Julian.

l>
Scroll to Top