Unused Variables

This container has user-defined variables. Data Layer Variables, Custom JavaScript, Lookup Tables, and so on. That no tag or trigger uses. The variables exist in Workspace → Variables but never get evaluated at runtime.

CL
By Christopher LandaverdeCreator of AdLint · ad-tech tracking specialistUpdated

Why It Matters

Unused variables share the same origin story as unused triggers and unused Data Layer Variables: leftover from migrations, half-finished implementations, or imported from other containers. The runtime cost is effectively zero. GTM only evaluates a variable when something references it. But the operational cost is the same as everywhere else in this audit. Every unused variable adds to the time a reviewer spends scrolling, and any one of them could be shadowing a variable somebody assumes is canonical. The check is info-level for this reason: not measurement-critical, but a leading indicator of governance health.

How To Fix It

  1. AdLint's details list each unused variable by name.
  2. For each, use GTM's "Find references" link to confirm no tags or triggers reference it.
  3. Decide: archive if not needed, or update the variable's description with a note explaining why it is being kept around.
  4. Archive (do not delete). Archiving is reversible and preserves audit history.
  5. Re-run AdLint after the next publish.

Example

Configuration
Variable: CJS - oldUserIdResolver
References: 0 tags, 0 triggers
Action: archive (the new auth flow replaced this).
For Your Client Report

User-defined variables in this GTM container that no tag or trigger references. While unused variables do not affect runtime measurement, they accumulate audit friction and increase the risk of silent shadowing. Where a forgotten variable masks a canonical one with a similar name. Fix: confirm each variable is genuinely unused via "Find references," then archive to preserve audit history. Source: support.google.com/tagmanager/answer/6164391.

Drop this paragraph into your client deliverable. Sources back to the canonical platform documentation linked below.

References

Audit your own files for this check

AdLint runs this check (and 177 others) against your GTM, Google Ads, Meta, TikTok, LinkedIn, Pinterest, Twitter/X, and Snapchat exports. Everything stays in your browser. No uploads, no accounts.

Run a free audit