Guide

5 Naming Conventions to Follow for GTM Event Tracking

A few things to think about when you’re coming up with a naming strategy.

Brad Redding:

Let’s talk a little bit about everyone’s favorite topic. If you have used Google Tag Manager before or if you have to do any sort of naming conventions, let’s talk a little through this. Number one. I am not here to give everyone the “best way to name and follow a naming convention” in a Google Tag Manager. I think I’ve seen 1000 different ways to do it and if it works for you and it works for your team and your partners and everyone follows the process then there’s really, in my opinion, no right or wrong way to go about it. So I’m going to walk through just a few things to think about when you’re coming up with your plan and strategy on naming and then show a few little hidden tricks or areas inside of Google Tag Manager that can help you with this.

Naming convention, where do we normally start with it? We normally start here looking at a Google Tag Manager screen and event where we have our category action and label right here. If you’re on a team, it’s likely you’re going to have three, four, or five, potentially dozens of different people that are creating tags inside of Google Tag Manager or you’re receiving links to containers from other third party marketing partners that have their own tags or templates that they want to add in. Usually this is the area that people start when thinking about and considering naming strategies, but this is probably the worst place to start looking, in my opinion, if you or someone who is responsible for interpreting this data. Really the place to think about and start with your name and convention is inside of Google Analytics itself.

This is where you’re, you’re likely to be analyzing the data or you’re pulling out this event data into another BI tool, and this is where ultimately you’re going to be led to answer the questions of how many people are doing X? Or how did this interaction impact our conversion rate during our sale or promotion last week? You’re not going into Google Tag Manager to look, you’re not coming into here to look to see that performance or report on that data, you’re coming into Google Analytics. As long as you’re still on the standard analytic setup and you haven’t really migrated to the new app plus web property, event category, the big bucket, event action and event label start here with your strategy creation. As I’ve talked about in the past, event category is really different for everybody and since we see different sources of event data coming into analytics, as you can see here, this has a little bit of a mix of our own funnel category that we created, some additional custom behavior event tracking like scroll tracking.

We have our page level categories here, like category, product page navigation, and then we started to see another mix of coats and jackets and accessories. And why are these categories? And this really happens as we’ve talked about in the previous overview on different data sources. We have some data coming in automatically from Shopify, some events coming in automatically from Shopify, and then we have some events coming in from Google Tag Manager, and we can’t override Shopify’s native event naming convention that they’re sending so you’re going to see this mix in here. Really think about your big buckets. Are you and your team the type that you want to have events tied to a page type? A page type would be homepage or a product page or a category page, or do you want to go down one level deeper where your category is going to be more feature based? Potentially navigation would be a category or Yappo, if we’re thinking about reviews. Yappo would be a category and all the event actions would fall under that particular feature for Yappo.

Think about that. Start on Google Analytics, go through your different reports. Just looking at the top events here you can see once we look at our event actions, that’s really all over the place. 50% is an event action. Is that scroll depth? Is it video play? I don’t know because it’s not labeled. Really dig into the way that you’d want to interpret the data in analytics and then pull it back and apply that to your naming strategy or conventions inside of Google Tag Manager. Areas to consider inside of GTM. There was a lot. Easiest one is just looking at the name of the event. If we just close this out here, you’re going to see all of our tags here, and if we just filter by Google Analytics you’re going to see, we have a bunch of different custom event tags here. And even these name naming conventions are different. So we have one which is a GA event. So this would be an example of a behavior event, and then this is an enhanced eCommerce event.

So coming up with a strategy for your name, your naming convention, so if someone else was to come into the GTM account to look for an event, then think about what is going to be the best way that makes sense for somebody? That’s actually a good point. That’s the way I’ve explained in the past of naming is don’t name it for yourself. Anything we go through here, name it if you invited someone else into the GTM account and they had to break it down and they had to interpret it and turn it around into a deliverable of here’s how your site is tagged, think about how you’d name it if you could not talk to that person. You need to make it foolproof for them to be able to look at your GTM account or container and interpret your event naming convention, to tell, ultimately say, “Okay, here’s all the events that are tracked in GA and here’s how we can analyze it and here’s how we can pull that data out.” Name it for someone else so they can interpret it.

Once we get into that individual tag, as we’ve talked a little bit about already, we have our category, our action, and our label. These are the big buckets we talked about. Now the event action I generally like to tag sites is I like to be a little bit more descriptive on what the action is. And then many times since we’re trying to limit the amount of tags we’re creating and maximizing the amount of interactions that we’re capturing, with the power of variables I’ll attach in a variable to an action. In this case, let’s say we did not have main nav click and I just had the category of navigation, and then the event action was just click text, it might not really make sense. If I apply that approach of if somebody else had to look at this event inside of GA and they just saw women’s socks as an event action, they probably are not going to know what that is. Did somebody click on women’s socks? Was it a category view? Was it a product view? What was it?

That’s why I generally like to add a little bit more of a descriptor here. Again, it’s not for everybody. That’s just one way to look at it. Label for us, as we’ve talked about, is we leave this as page URL, unless the tag is just specific to only one page and it’s only going to fire on that page, then we might use something different. But for the most part, it’s going to be the page URL. 

Next up is going to be your trigger. How do we name triggers? This is another area that I see a lot of different strategies applied to it. You can take the strategy of you put the trigger type first, and then what the trigger name is doing. You can just put what the name of the trigger is doing, so just main navigation click. Again, there’s a million different ways to think about it, but it is important to look at the trigger naming convention because many times what you’re going to potentially run up against is a request to add a new tag to your site.

And even if it’s not a Google Analytics tag, if it’s a tag for Facebook or AdWords or something else, you might need to go look to see if that trigger exists and then you can attach that to that tag that you’re creating. This is a list of just looking at trigger names. 

Variables are next. How do you name variables? You have the built in variables from GTM and now you have your user defined variables. I think for the most part there’s been a convention over the community of DLVs, so data layer variable, that’s been used in the names. I’ve seen that used quite a bit, and then it could do your custom JS, so your custom JavaScript. But ultimately you’re going to see many different ways of doing this, but just think of that approach of, if somebody had to come in here and look for a variable to apply to another tag, how descriptive can you make that variable so someone could interpret it very quickly?

These are very descriptive or have AdWords, cart view, product IDs. We’re talking exactly what this is being used for. So if someone needed to come in here and look for an AdWords cart, cart view, product ID array, hopefully they could pick that apart. 

Now let’s look at another area, which I would say is under utilized is folders. Folders is really a smart way to categorize and group together your different tags and triggers and variables. If you wanted to break them up by function or page type, like we have cart checkout, you can do it this way. You can break out four different marketing channels so you can see AdWords versus Twitter versus Facebook. Something that we do with our Shopify app is we have a folder that we put everything that needs to be updated on install. We drop these right in here, because we’re basically stating once you import this container we need you to update a few variables or a few settings on those tags or triggers or variables in order for it to become useful for you.

This, again, as far as I know, there isn’t a limit on number of folders so if you wanted to create a very organized structure and process, you can go through that. And then GTM will also group everything that doesn’t have a folder. I have unfiled items, these are specific to behavior tags, so custom event tags, so we can add these to their respect to folders if he wanted to. And we’ll just move them to our folders that we would potentially track those on. 

Last but not least are notes. So notes on tag, a very hidden feature, but very useful, especially when you’re collaborating with other people on tags. When you are looking at a tag, you click on the ellipsis, there’ll be a show of notes. And you can see notes can now be added to the bottom of your tag. So it can be very short. It can be very detailed.

You can link to a tag plan if you wanted to, but if you’re making changes or if you’re collaborating, then notes can be a very useful feature to help in your general organization of your account to keep people somewhat following, as much as you can, a convention and a process, and ultimately allowing people to understand what’s been set up in your account. Not that you have to leave notes for all tags. We don’t leave notes for all tags. However, if there’s something unique or if you need to call something out or a change or if it was requested by another stakeholder notes can be a good area for you to utilize. I hope this helps give you a little bit of context on naming conventions and where to consider inside of Google Tag Manager. 

Really the last point I wanted to make here is on your event tags, is if you don’t have a lowercase filter set up inside of Google Analytics, which we walked through in our Google Analytics section in this training, then try to keep all of your casing either lowercase, uppercase.

That will prevent any casing sensitivity if, for example, mobile versus desktop is sending navigation in all caps or lowercase. If the events that we’re sending to GA is all lowercase then it automatically will send that and we won’t potentially see some of that mixed casing issues. In order to get any of our variables as lowercase that’s where we ultimately need to apply that filter inside of Google Analytics so we’d have a lowercase filter on the view and a lowercase filter for event category, event action, event label. That way, again, if we see any of that cross device casing sensitivity then we’re just going to force everything to lowercase.

 

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