Overview On Custom Templates for Google Tag Manager

How templates are another mechanism to implement technical tracking and protection on your store.

Brad Redding:

We just learned a lot about custom HTML tags and how we can apply those to our own store from custom data layer pushes to custom marketing tags and racketing and Facebook, etc. Templates are really the next phase of custom HTML tags. Templates are something that Google created, which is basically Sandbox JavaScript, that anybody, so any developer can create a custom template, apply permissions and privacy and different rules to that template, which is ultimately JavaScript. That’s going to run on the site and enable that as part of a gallery that you can select from and add to your store.

To put it very simply, this is just another mechanism that is really trying to shorten that bridge of marketers that need to implement technical tracking or third party JavaScript tracking on your store. You can see some of the templates that we already have inside of the tag template gallery here from a firm to content squared, Taboola Outbrain, Facebook, etc. These look very similar to those built in tag types that Google created. Google went through the process of creating those built in tags for us. Now this is an independent library where anybody can submit templates to the gallery as long as they’re following different standards. And ultimately they go through a verification process.

Now I’m not going to dive into the technical details and nitty gritty of templates. Basically the big thing that is great for all of us. This is ultimately going to add another layer of privacy to JavaScript that’s running on our site because every single template that we have added in here, you or your developers or team can ultimately control what URLs that the JavaScript is able to run from. In this example, this is a Facebook pixel template, and we’re only allowed, JavaScript is only allowed to execute on your site if it matches this pattern. That means if this Facebook’s script or tag was attempting to run some other piece of JavaScript from a different URL, it would not be able to, since there’s a rule that says, “Hey, when this tag is attempting to run on my store, it needs to be this specific JS.”

All right. That’s a little bit in the weeds. Let’s back it up just a second here and go back to, okay. How does this change the way that I add tags to my store. Going to our tags, to go through the process of adding a new marketing tag, we’d go to our tag configuration, we’d see our built in Google tags, we’d see the built in Google tag types. The non-Google tags, but built in tags at Google it’s going to create it for us. So we look at ad roll and a few others.

Now under custom, we have our Taboola pixel, which is a custom template that I created and added to my store. Now I’ve selected this, now this Taboola pixel has the different permissions that we just looked at, it’ll only allow JavaScript to run from this particular URL. Taboola has gone through and actually created all of these configurations for this template, so I can select between my base pixel, my event pixel, the event names that Taboola created. Again, they’ve mapped all of this and it’s really simplifying your process. Now you can add a trigger just like you would with any other tag. Finally, we have the same options that we do with our other tag types of setting a tag, firing priority, different options on our sequencing.

Really to try to keep this simple, custom templates are really the next wave of our custom HTML tags, where you will have access to an even wider range and collection of third party scripts, third party marketing scripts that you need to add to your site. And they have a lot of the configurations already built out where it’s just going to be a simple variable match, again just looking at the Taboola template example. If we wanted to add a custom parameter for item URL, revenue, etc., this would function just like we were looking at with our tag types, where we can select our variable, assign it, and ultimately add our trigger and publish and we’re on our way.

Look out for more training and overview on how templates, both tag templates and variable templates can be applied to your store because they are very powerful. At Elevar, we’re using these to help enable monitoring to really simplify the process of you implementing your marketing tags. You add your data layer variables, and then let Google tag manager do the hard part of validating those tags, validating the variables that live across your store and ultimately notifying you when something breaks, something goes undefined. So you can focus more of your energy on the marketing and strategy and conversion optimization and less worrying about if your marketing tags, functioning and working as expected.

(“Elevar”) is strongly committed to protecting and respecting your privacy rights.