Analytics and Tracking

Tag

Also called Tracking tag, pixel

A piece of code fired on a page to send data to an analytics or advertising platform.

Quick facts: Tag

Category
Analytics and Tracking
Also called
Tracking tag, pixel
Level
Beginner
Affects
Data accuracy, page speed, privacy exposure
Where to see it
Google Tag Manager, Tag Assistant, GA4 DebugView, browser network tab
In this article4
  1. How a tag works
  2. Why tags matter
  3. Where tags go wrong
  4. How to act on it

How a tag works

A tag is the piece of code that actually sends something somewhere. When the condition attached to it is met, Tag Manager places that code on the page, it runs, and a request goes off to Google Analytics, Google Ads, Meta or whichever platform the tag belongs to, carrying whatever values it was told to include.

Most tags are built from templates. You pick the type — a GA4 event, a Google Ads conversion, a Meta pixel event — fill in the fields it asks for and Tag Manager writes the code for you. A custom HTML tag is the escape hatch for a vendor with no template of its own, and it is also where most of the risk lives, because it can contain anything.

On its own a tag does nothing at all. It needs a trigger to tell it when to run and usually variables to tell it what to send. Tag, trigger, variable: nearly every tracking fault sits in one of those three, and knowing which one saves hours.

Why tags matter

Every figure in your reports exists because a tag fired. If a tag sends the wrong value, the reports are wrong, the ad platform optimises towards the wrong outcome, and budget decisions follow the error rather than the business. Bad tagging is expensive in a way that is very hard to see from a dashboard.

Tags also cost something on every page load. Each one is a request to somebody else’s server and, in most cases, a party receiving data about your visitors. That makes the list of tags a page-speed question and a privacy question at once, not just a marketing one.

Where tags go wrong

Duplication is the most frequent problem. A GA4 tag in the container, plus the same measurement added by a theme setting or a plugin, produces two hits for one action. Conversions look healthy, cost per lead looks impossible, and nobody questions it because the trend still moves in the right direction.

Firing on the wrong signal comes next. A purchase tag attached to a page view rather than to a real order event will keep counting refreshes and shared links. And a tag can fire perfectly while sending nothing useful: if the variable it depends on returns empty, preview still shows a green tick and the destination receives a blank value.

Finally, tags outlive their campaigns. Old remarketing pixels and abandoned test tags stay in containers for years, quietly loading and quietly sharing data.

How to act on it

Name tags in a consistent pattern — platform, type, then detail — so a container remains readable to whoever inherits it. Give every tag an obvious reason to exist, and delete rather than pause the ones that no longer have one.

Test in preview before publishing, and check the values being sent, not merely that the tag fired. Then confirm the data arrived at the far end, in GA4 or the ad platform’s own reporting, because those two checks catch different faults. If the reports and the ad accounts already disagree, a structured tracking audit will find the duplicate or the empty value faster than tag-by-tag guesswork.

Do and do not

Do

  • Name tags by platform, type and detail
  • Check the values sent, not just that it fired
  • Delete tags whose campaign has ended

Do not

  • Install the same measurement in a plugin and the container
  • Attach purchase tags to page views
  • Paste vendor code into custom HTML without reading it

Questions people ask about this

What is the difference between a tag and a pixel?

In practice they describe the same thing from different angles. Pixel is the older advertising word for a small piece of tracking code an ad platform asks you to install. Tag is the tag manager word for any code it fires, including those pixels. If someone asks you to add their pixel, you almost always add it as a tag.

Why are my conversions counted twice?

Nearly always because the same measurement is installed in two places: once in the container and once by a plugin, theme setting or hard-coded snippet. It can also happen when a tag fires on both a page view and an event for the same action. Check the page source and the container together before changing anything else.

Can I fire a tag on only some pages?

Yes, and you usually should. A trigger can be limited by page path, hostname, a named event or almost any value the container can read. Restricting tags to the pages that need them keeps other pages faster, reduces unnecessary data sharing, and makes the container far easier to reason about later.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.