Analytics and Tracking

Tag

A snippet of code on a website that sends information about visits and actions to a tool such as GA4, Google Ads or Meta.

Quick facts: Tag

Category
Analytics and Tracking
Level
Beginner
Affects
Analytics data, ad platform conversions, site speed, cookie compliance
Where to see it
Google Tag Manager, Tag Assistant, GA4 DebugView, browser developer tools
In this article4
  1. How a tag works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

A tag is a small piece of code on a website that sends information about what visitors do to another tool. The GA4 tag sends page views and events to Google Analytics, the Google Ads conversion tag reports enquiries and sales, and the Meta Pixel does the same for Facebook and Instagram advertising.

How a tag works

When a page loads, the browser runs the tag’s code. The tag collects details such as the page address, the referring site and an identifier stored in a cookie, then sends them as a request to the tool’s servers. Some tags fire on every page; others fire only when something specific happens, such as a form being submitted or a booking being confirmed.

Tags can be pasted straight into a site’s code, added through a CMS plugin, or managed in a tag management system. In Google Tag Manager each tag is paired with a trigger, which says when it fires, and uses variables, which supply values such as the order total. All of them live in one container that is installed on the site once. A tracking pixel is an older name for the same idea, from the days when tags were a tiny invisible image.

Tags also differ in where they send data from. A client-side tag runs in the visitor’s browser. A server-side setup sends one stream of data to a server you control, which then forwards it to each tool. The second gives you more control over what leaves your site, but it still needs the same consent decisions.

Why it matters

Tags are where your marketing data is born. If a conversion tag fires twice, your ad platform reports double the leads and its automated bidding chases the wrong signal. If it does not fire at all, campaigns that are working look like they are failing. A large share of reporting problems trace back to a tag that is missing, duplicated or firing at the wrong moment.

In the UK, tags also carry legal weight. Most analytics and advertising tags set or read cookies, and PECR requires consent for non-essential cookies before they are set. The ICO has written to operators of many of the UK’s most visited websites about cookie banners that did not give a real choice. Tags that fire before a visitor has answered the banner are a frequent cause, and the fix lives in how the tags are set up, not in the banner text.

Common mistakes

  • The same tag installed twice. A plugin adds GA4 and someone also adds it in Tag Manager, so every page view counts double.
  • Tags firing before consent. Without consent mode or consent-based triggers, tags run regardless of what the visitor chose.
  • Conversion tags on the wrong trigger. Firing on a button click rather than a successful submission counts failed attempts as leads.
  • Tags nobody remembers adding. Old agency pixels and abandoned trial tools slow the site and send data to companies you no longer work with.

How to act on it

Make a list of every tag on your site, what it sends, which tool receives it and who asked for it. Your browser’s developer tools and Google’s Tag Assistant will show what actually fires. Remove anything without an owner, move the rest into one tag manager, and check that each non-essential tag waits for consent. Then test your main conversions end to end with a real form submission or test order.

A clean, consented tag setup is the foundation of the paid media work in my performance marketing service, and a tracking audit is usually where it starts.

Do and do not

Do

  • Keep an inventory of every tag and its owner
  • Make non-essential tags wait for consent
  • Test conversion tags with a real submission

Do not

  • Install the same tag through two methods
  • Fire conversion tags on a button click alone
  • Leave old agency or trial tags running

Questions people ask about this

What is the difference between a tag and a pixel?

In practice they mean the same thing. Pixel comes from the early method of loading a 1x1 invisible image to send data. Most modern tags, including the Meta Pixel, are JavaScript, but the old name stuck.

Do I need Google Tag Manager to add tags?

No. You can add tags directly to your site's code or through a plugin. Tag Manager becomes worthwhile once you have more than two or three tags, conversion events or consent rules to manage, because it keeps everything in one place with version history and a preview mode.

Do all tags need cookie consent in the UK?

Tags that set or read cookies or similar storage for analytics or advertising generally need consent under PECR. Strictly necessary functions, such as keeping items in a basket, do not. Some tags can run in a cookieless mode before consent, but check the ICO's current guidance and your own legal advice before relying on that.

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.