Skip to main content
TagManifest /Docs Dashboard

Variables without standard type prefixes

40%+ of user-created variables lack standard type prefixes (DLV, CJS, LUT, CONST, etc.). Type prefixes make it immediately clear what kind of variable is being referenced.

On this page 6

Summary

  • rule_id — variable-no-type-prefix
  • purpose — Detect containers where too many user-created variables lack standard type prefixes
  • effect — Variable type is opaque when referenced in tags and triggers; requires opening each variable to inspect
  • layer — container
  • reversibility — non-destructive

What fires this

The rule filters out GTM built-in variables — names starting with gtm. or type e — because users cannot rename them. For the remaining user-created variables, it tests each name against a prefix pattern covering DLV, CJS, LUT, CONST, REGEX, URL, DOM, 1PC, JS, and K, each followed by a separator (dash, en-dash, period, or space). The rule fires when 40% or more of user-created variables fail that test. Containers that are mostly well-prefixed but have a small legacy tail do not fire.

Why it matters

When a tag references {{form_name}}, a reviewer cannot tell whether it is a Data Layer Variable, Custom JavaScript, or a Lookup Table without opening the variable. Type prefixes communicate type at a glance: {{DLV - form_name}} is unambiguously a Data Layer Variable; {{CJS - form_name}} is Custom JavaScript. The convention reduces audit time, speeds up debugging, and lowers handoff friction for new developers working in the container.

Before / after

Container has 18 user-created variables. 11 use bare descriptive names:

form_name
page_category
user_id
email
product_sku
order_total
button_text
referrer_domain
session_id
experiment_variant
ga_client_id

Same variables renamed with type prefixes:

DLV - form_name
DLV - page_category
DLV - user_id
DLV - email
DLV - product_sku
DLV - order_total
DOM - button_text
DLV - referrer_domain
1PC - session_id
DLV - experiment_variant
CJS - ga_client_id

Remediation

  1. Define the prefix convention for your container: DLV (Data Layer Variable), CJS (Custom JavaScript), LUT (Lookup Table), CONST (Constant), 1PC (First-Party Cookie), URL (URL variable), DOM (DOM element), REGEX (Regex Table), K (Google Tag key).
  2. Open GTM and review the flagged variables returned in the rule output.
  3. Rename each variable to include the appropriate prefix and a separator, for example form name → DLV - form_name.
  4. GTM updates all tag and trigger references automatically when you rename a variable in the UI — no manual find-replace is needed.
  5. Publish the container after the renaming pass is complete.

Metadata

Severity
low
Tier
info
Category
organization
Layer
container
Version
1
Effort
2hr (about 2 hours)
Reversibility
non-destructive

See also

Examples

Evaluate
curl https://developer.tagmanifest.com/v1/evaluate-rule \
  -H "Authorization: Bearer $TM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_id":"variable-no-type-prefix","url":"https://example.com"}'