A small script a website adds to its pages so a service can record visits — the way analytics, ad and visitor-identification tools collect data.
A tag is usually one line of HTML loading a script from the vendor’s server. When a page loads, the script reads a few facts about the visit and sends them back. Tags are added by hand, through a content management system, or through a tag manager such as Google Tag Manager.
What a tag reads matters. Some read only the page and a cookie; some read form fields as people type, which has been central to wiretap lawsuits under laws such as California’s CIPA. Size matters too: a heavy tag slows pages.
What a typical tag does
- Loads. The browser fetches the script, ideally without holding up the rest of the page.
- Reads. It collects what it was built to collect: often the page address and title, the referring page, the time, the screen size, and an ID from a cookie.
- Stores. It may set or read a first-party cookie, or local storage, to recognize the browser next time.
- Sends. It posts what it read to the vendor’s server, usually in a way that doesn’t make the page wait.
- Listens. Some tags keep running: recording clicks, scrolls, route changes in single-page apps, or form fields.
- 01Loads
- 02Reads
- 03Stores
- 04Sends
- 05Listens
Pixels, tags and SDKs
The words overlap. A pixel is the oldest form: a tiny invisible image whose request carries the data. A tag is a script that can do more. An SDK is the same idea inside a mobile app. All three let a third party learn about a visit to someone else’s property, which is why they’re regulated.
What to check before adding one
- What it reads. Ask for a list. A tag that reads form fields or records sessions carries more legal risk than one that reads the page address.
- Where it sends data, and whether the vendor passes it on.
- Whether it honors privacy signals such as Global Privacy Control.
- Its size and how it loads. Asynchronous loading keeps pages fast.
- Whether you can read it. A tag you can open and read is easier to trust than one that’s minified past recognition and changes without notice.
Tag managers
A tag manager lets marketing teams add and change tags without a code release. That’s convenient, and it’s also how many sites end up running tags nobody remembers adding. Review the tag manager’s contents as you would your site’s code: every tag should have an owner and a reason, and appear in your privacy notice.
Tags and privacy notices
Every tag that collects data about visitors should be named in the site’s privacy policy, with what it collects and why, and its cookies listed. A site that can’t say what each of its tags does can’t honestly tell visitors what happens to their data. What to tell your visitors.
An example
A marketing team adds an identification tag to the site’s head through its tag manager. On every page load, the tag sends the page address, title and referrer with a random ID from its first-party cookie. When a visitor fills in the demo form, the site’s own code calls the tag with the email they entered, and the tag sends a coded version. The tag never sees the other fields in the form, because nothing passes them to it.
Common mistakes
- Installing it twice, directly and through a tag manager, so every page view is sent twice.
- Forgetting the notice. Every tag that collects visitor data belongs in the privacy policy.
Questions
Does a tag slow a site down? It can. A small script loaded asynchronously has little effect; several large ones loaded early can delay a page noticeably.
Can two identification tags run at once? Yes. Each reports to its own vendor. That’s how a fair side-by-side test works.
Should a tag go in the head or the body? Most vendors ask for the head, so the tag loads early on every page. An asynchronous tag in the head doesn’t block the page.
In Namorus: the tag is 3.8 KB, loads asynchronously, and reads the page address and title, the referrer and its own cookie. It sends with navigator.sendBeacon, which doesn’t make the page wait, and records route changes in single-page apps. It never reads keystrokes or what someone is typing; it sends the email box of a form when the form is submitted, unless the site switches that off. It does nothing identifying when the browser sends Global Privacy Control. A site can’t send anything until its owner has verified the domain. You can read it at cdn.namorus.com/id.js.1