Skip to main content
TagManifest /Docs Dashboard

Lookup table missing default value

Lookup table variable has no default value configured, returning undefined for unmatched inputs.

On this page 6

Summary

  • rule_id — lookup-no-default
  • purpose — Detect Lookup Table variables that return undefined when input doesn't match any row
  • effect — Tags depending on the variable receive undefined silently, which can break firing conditions or send malformed data
  • layer — container
  • reversibility — non-destructive

What fires this

The rule filters all container variables where type === 'smm' (GTM's internal type for Lookup Table variables) and lookupTable is present. It flags any variable where lookupTable.hasDefault is false. Each flagged variable is reported with its name, input source, and entry count. The rule emits one issue per container with all affected variables grouped together.

Why it matters

A Lookup Table with no default returns undefined for any input that doesn't match a row. Tags that use that variable as a trigger condition, a parameter value, or a conversion ID can fire incorrectly, send blank fields, or fail without any visible error. The breakage is hard to detect in preview mode because it only appears for inputs not present in your test data. Adding a default — even an empty string or a sentinel like "unknown" — makes the failure mode explicit and testable.

Before / after

Lookup Table variable DL - Page Category maps URL path patterns to category names. No default row is set.

/blog/post-123 → matches "blog" /careers/senior-engineer → no match → returns undefined

The GA4 event fires with page_category: undefined.

Lookup Table variable DL - Page Category maps URL path patterns to category names. Default value is set to "other".

/blog/post-123 → matches "blog" /careers/senior-engineer → no match → returns "other"

The GA4 event fires with page_category: "other".

Remediation

  1. Open the GTM container and navigate to Variables.
  2. Open each variable listed in the rule output.
  3. Scroll to the bottom of the Lookup Table configuration.
  4. Enable "Set default value."
  5. Enter a value appropriate to the variable's downstream use: an empty string, "unknown", or a clearly invalid sentinel for conversion ID variables.
  6. Save and publish the container.
  7. Confirm that tags receiving this variable no longer evaluate to undefined for unmatched inputs.

Metadata

Severity
medium
Tier
optimization
Category
quality
Layer
container
Version
1
Effort
15min (about 15 minutes)
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":"lookup-no-default","url":"https://example.com"}'