Creating and Naming Tags: Building a Scalable System

Home / Everything About / Everything About Analytics / Creating and Naming Tags: Building a Scalable System

How do you create a tag that works reliably? Should you create one tag per action or group similar actions together? How do you name tags so everyone understands what they do? Most teams create tags randomly. One person names it "conversion." Another names it "conv." Another names it "purchase_event." Nobody can find anything. Six months later, nobody knows which tag does what. Tag creation and naming seem simple but mess up early and you're stuck with chaos. Get the system right from day one.

This article explains how to create scalable tags and use naming conventions that make sense to everyone on your team.

What Is a Tag

A tag is a code snippet that fires when a specific action happens on your website. When someone makes a purchase, a purchase tag fires and sends data to your analytics platform. When someone submits a form, a form submission tag fires. When someone watches a video, a video play tag fires.

Tags are managed through a tag manager. The tag manager is the container that holds all your tags. Instead of putting multiple tracking codes directly on your site, you put one tag manager code on your site. The tag manager then fires all your individual tags based on rules you set up.

Tags let you track specific actions beyond basic page views. They're how you measure conversions, engagement, and specific user behaviors that matter to your business.

Plan Your Tag Structure Before Creating

Before you create your first tag, plan the structure. What actions do you need to track? Purchases. Form submissions. Video plays. Button clicks. Map out all the actions you care about. Then decide how to organize them into tags.

One approach is one tag per action. One tag for purchases. One for form submissions. One for video plays. This is simple but creates many tags.

Another approach is to group related actions. One tag for all conversions. One tag for all engagement. One tag for all errors. This reduces tag count but each tag does more work.

Most teams use a hybrid approach. One tag for each primary conversion. Multiple engagement actions in one tag. The right structure depends on your complexity level.

Create Tags With Clear Purpose

Each tag should have one clear purpose. A tag should track one action or a group of closely related actions. A purchase tag fires when someone buys. An engagement tag fires when someone interacts with content. A tag with mixed purposes is confusing.

Define what each tag measures. Write one sentence describing the tag's job. If you can't write one clear sentence, the tag is doing too much. Simplify it.

Test the tag in a staging environment before deploying to production. Confirm it fires when expected. Confirm it doesn't fire when it shouldn't. A broken tag in production breaks your data.

Develop Naming Conventions

Create a naming system for all your tags. Include a category prefix. "Analytics - Google Analytics." "Advertising - Facebook Pixel." "Conversion - Purchase." "Engagement - Video Play." Prefixes make it obvious what each tag does.

Use consistent capitalization. All lowercase. All uppercase. Title case. Pick one style and stick with it. Inconsistent capitalization makes it hard to find tags.

Keep names short but descriptive. "Purchase" is better than "Purchase Conversion Event." "Video Play" is better than "Video Play Event Track." Names should be readable without being verbose.

Use a Tag Registry

Create a document that lists all your tags. Include the tag name, the category, what it measures, when it fires, and who created it. This is your tag registry.

Update the registry every time you create or modify a tag. When someone new joins the team, they can read the registry and understand the entire tracking system.

Use a spreadsheet or a dedicated tool. A spreadsheet is fine for small teams. As you grow, dedicated tag management tools become valuable.

Test Tags Thoroughly

Before deploying a tag to production, test it completely. Does it fire on the right pages? Does it fire on the right events? Does it pass the right data? Does it work on mobile? Does it work on all browsers?

Test in staging first. Then test in production with a small percentage of traffic. Monitor real-time data to confirm the tag behaves as expected.

Don't deploy tags during business hours without monitoring. If something breaks, you want to notice immediately and fix it.

Document Tag Implementation Details

Document how each tag works. Where does it fire? What data does it collect? What conditions trigger it? What happens if it breaks?

Include implementation notes. "This tag requires the data layer to be populated." "This tag depends on the Facebook pixel loading." "This tag has a 5-second delay." Notes help troubleshoot when something breaks.

Share this documentation with your team. When someone inherits these tags later, they'll understand how everything works.

Frequently asked questions

Should we create one tag per action or group similar actions?

How do we handle tag naming when we have hundreds of tags?

What happens if we change a tag's name after it's been deployed?

Should we create test tags for staging or use production tags with conditions?

We have legacy tags from years ago that nobody understands. Should we delete them?

How do we maintain tag consistency across multiple websites?