Scenario · Content and search
Add or remove a tracking pixel
“Our ads agency needs their pixel on the site.” Or: “Take the old agency's pixel off.”
Every advertising agency a practice has ever worked with tends to leave a tracking pixel behind, and nobody removes them, because removing one has no visible effect and a small chance of breaking someone's reporting — the result is a site quietly sending patient browsing behavior to several ad networks nobody's even paying anymore. This inventories exactly what's tracking the page right now, confirms the pixel that's supposed to be there is there exactly once, and confirms a removed one is actually gone rather than just switched off, which is the setting that lets it quietly come back.
What to ask for
See it work
A real run of Analytics & tags:
FAIL — 1 page(s)
tags: Universal Analytics (legacy) (UA-12345-1) — legacy
[error] legacy Universal Analytics present (UA-12345-1) — UA stopped processing data in July 2023; this tag is dead weight
[warn] no analytics or tag manager detected — is this page being measured?
playbook: local fallback
report: ./out/analytics-and-tags-analytics-and-tags.html
text: ./out/analytics-and-tags-analytics-and-tags.txtThe captured report, exactly as a run hands it to a client —open the full report ↗
Pixels accumulate. Every agency a practice has worked with left one, and nobody removes them, because removal has no visible effect and carries a small risk of breaking someone’s reporting. The result is a site sending patient browsing behaviour to four ad networks, three of which nobody is paying.
- Inventory what is firing now. The tag audit lists every measurement and advertising tag on the page — Meta, LinkedIn, TikTok, Microsoft, Pinterest, Google Ads, and the session-replay tools. Do this before adding anything, because it is also the answer to “which of these are ours”.
- Read the container. The container audit shows what is published rather than what happened to fire on one page load, including anything paused, and any Custom HTML tag — which is arbitrary JavaScript running on every page and deserves reading before it is trusted.
- Decide where it goes: container, not template. A pixel installed through the tag manager can be found, paused and removed by whoever comes next. One pasted into a theme template is invisible to every audit and survives until someone greps the theme.
- [manual] Add or remove the tag and publish the container version. For a removal, remove it rather than pausing it — a paused tag is a tag someone re-enables by accident. Confirm the change is in a published version, not a workspace.
- Verify from the outside. The tag audit again: the intended pixel present exactly once, the removed one absent. A pixel firing twice double-counts and is the standard consequence of installing one that was already there in the template.
- Re-measure performance. Ad and replay pixels are third-party scripts on every page. Several of them is a measurable load cost and worth reporting when the answer is “the site got slower”.
- For a removal, tell whoever owned it. A pixel that stops reporting looks like a broken campaign to the agency relying on it, and that conversation is cheaper before than after.
Remove, don’t pause
Pausing is the reversible-feeling option and that is exactly the problem: the tag stays in the container, survives the audit as “present but inactive”, and gets re-enabled by the next person cleaning up paused tags. If it should not be firing, it should not be there.
What this does not cover
Whether the pixel should be there at all. A tracking pixel on a page about a medical procedure sends that page's URL to an advertising network, and whether the practice may lawfully do that — with or without consent — is a legal question, not a technical one. Nothing here evaluates it. What this does is make sure the pixel that is meant to be there is, the ones that are not meant to be there are gone, and neither is doing it twice.