Analytics & measurementBeginner

Tag

A tag is a snippet of code on a web page that sends data about a visit or action to an analytics, advertising or marketing tool. Triggers decide when it fires.

Also called: Tracking tag, Pixel

In analytics, a tag is a piece of code that collects data in the browser and sends it to a third-party or first-party tool. The Google tag, ad platform pixels, heatmap scripts and chat widgets are all tags. In a tag manager such as Google Tag Manager, each tag is paired with triggers, the rules that decide when it fires, and variables, the values it sends.

Tags, triggers and variables

A trigger is a condition such as all page views, a click on a specific link, a form submission or a custom data layer event. A tag fires when its trigger conditions are met and can also have exception triggers that block it. Variables supply values such as page path or a plan name. Getting the trigger right is usually harder than getting the tag right.

  • Page view triggers: fire on page load, DOM ready or window loaded
  • Click and form triggers: fire on user interactions
  • Custom event triggers: fire when the data layer receives a named event
  • Timer, scroll and visibility triggers: fire on time or position

Pixels and beacons

Pixel is an older name for a tag that loads a tiny image to send data in its URL. Many ad platforms still call their tags pixels even though they now run JavaScript and send requests in other ways.

The cost of tags

Each tag adds script weight, network requests and, often, cookies. Too many tags slow pages and can hurt Interaction to Next Paint. Many also need consent before they run in some regions. Audit tags regularly and remove those without a clear owner or use.

Example

A tag audit before a performance push

Suppose Pinecairn, a payroll tool, lists every tag in its GTM container. Of the twenty-three tags (an illustrative count), seven belong to tools the company no longer pays for. Removing them reduces script on every page and simplifies the consent configuration.

Common mistakes

Firing everything on all pages

A tag needed only on the checkout page should not load on the blog.

No exception triggers for internal or test traffic

Without them, staging and internal visits mix with real data.

Questions

No. A tag is code that runs; a cookie is a small piece of stored data. Many tags set or read cookies, but some do not.

Know the terms. Now win the searches.

We find the searches your buyers make, then build, publish and improve the pages that win them.