[{"data":1,"prerenderedAt":327},["ShallowReactive",2],{"rule-lookup-no-default":3},{"id":4,"title":5,"body":6,"breadcrumb":290,"coderail":297,"dateModified":316,"datePublished":316,"description":317,"extension":318,"meta":319,"navigation":320,"next":316,"path":321,"prev":316,"schemaType":322,"seo":323,"stem":324,"wide":325,"__hash__":326},"docs\u002Frules\u002Flookup-no-default.md","Lookup table missing default value",{"type":7,"value":8,"toc":280},"minimark",[9,16,61,66,81,85,95,99,156,160,190,194,252,256],[10,11,12],"p",{},[13,14,15],"strong",{},"Summary",[17,18,19,30,40,49,55],"ul",{},[20,21,22,25,26],"li",{},[13,23,24],{},"rule_id"," — ",[27,28,29],"code",{},"lookup-no-default",[20,31,32,35,36,39],{},[13,33,34],{},"purpose"," — Detect Lookup Table variables that return ",[27,37,38],{},"undefined"," when input doesn't match any row",[20,41,42,45,46,48],{},[13,43,44],{},"effect"," — Tags depending on the variable receive ",[27,47,38],{}," silently, which can break firing conditions or send malformed data",[20,50,51,54],{},[13,52,53],{},"layer"," — container",[20,56,57,60],{},[13,58,59],{},"reversibility"," — non-destructive",[62,63,65],"h2",{"id":64},"what-fires-this","What fires this",[10,67,68,69,72,73,76,77,80],{},"The rule filters all container variables where ",[27,70,71],{},"type === 'smm'"," (GTM's internal type for Lookup Table variables) and ",[27,74,75],{},"lookupTable"," is present. It flags any variable where ",[27,78,79],{},"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.",[62,82,84],{"id":83},"why-it-matters","Why it matters",[10,86,87,88,90,91,94],{},"A Lookup Table with no default returns ",[27,89,38],{}," 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 ",[27,92,93],{},"\"unknown\""," — makes the failure mode explicit and testable.",[62,96,98],{"id":97},"example","Before \u002F after",[100,101,102,132],"compare",{},[103,104,106,113,125],"compare-col",{"label":105},"Before — flagged",[10,107,108,109,112],{},"Lookup Table variable ",[27,110,111],{},"DL - Page Category"," maps URL path patterns\nto category names. No default row is set.",[10,114,115,118,119,122,123],{},[27,116,117],{},"\u002Fblog\u002Fpost-123"," → matches \"blog\"\n",[27,120,121],{},"\u002Fcareers\u002Fsenior-engineer"," → no match → returns ",[27,124,38],{},[10,126,127,128,131],{},"The GA4 event fires with ",[27,129,130],{},"page_category: undefined",".",[103,133,135,143,151],{"label":134},"After — fixed",[10,136,108,137,139,140,131],{},[27,138,111],{}," maps URL path patterns\nto category names. Default value is set to ",[27,141,142],{},"\"other\"",[10,144,145,118,147,122,149],{},[27,146,117],{},[27,148,121],{},[27,150,142],{},[10,152,127,153,131],{},[27,154,155],{},"page_category: \"other\"",[62,157,159],{"id":158},"remediation","Remediation",[161,162,163,166,169,172,175,181,184],"ol",{},[20,164,165],{},"Open the GTM container and navigate to Variables.",[20,167,168],{},"Open each variable listed in the rule output.",[20,170,171],{},"Scroll to the bottom of the Lookup Table configuration.",[20,173,174],{},"Enable \"Set default value.\"",[20,176,177,178,180],{},"Enter a value appropriate to the variable's downstream use: an empty string, ",[27,179,93],{},", or a clearly invalid sentinel for conversion ID variables.",[20,182,183],{},"Save and publish the container.",[20,185,186,187,189],{},"Confirm that tags receiving this variable no longer evaluate to ",[27,188,38],{}," for unmatched inputs.",[62,191,193],{"id":192},"metadata","Metadata",[195,196,199,200,205,199,209,213,199,216,220,199,223,226,199,229,233,199,236,240,199,246,249],"dl",{"className":197},[198],"spec-list","\n  ",[201,202,204],"dt",{"id":203},"severity","Severity",[206,207,208],"dd",{},"medium",[201,210,212],{"id":211},"tier","Tier",[206,214,215],{},"optimization",[201,217,219],{"id":218},"category","Category",[206,221,222],{},"quality",[201,224,225],{"id":53},"Layer",[206,227,228],{},"container",[201,230,232],{"id":231},"version","Version",[206,234,235],{},"1",[201,237,239],{"id":238},"effort","Effort",[206,241,242,245],{},[27,243,244],{},"15min"," (about 15 minutes)",[201,247,248],{"id":59},"Reversibility",[206,250,251],{},"non-destructive",[62,253,255],{"id":254},"see-also","See also",[17,257,258,266,273],{},[20,259,260,265],{},[261,262,264],"a",{"href":263},"\u002Fcategories\u002Fquality\u002F","Quality rules"," — other rules in this category",[20,267,268,272],{},[261,269,271],{"href":270},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,274,275,279],{},[261,276,278],{"href":277},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":281,"searchDepth":282,"depth":282,"links":283},"",2,[284,285,286,287,288,289],{"id":64,"depth":282,"text":65},{"id":83,"depth":282,"text":84},{"id":97,"depth":282,"text":98},{"id":158,"depth":282,"text":159},{"id":192,"depth":282,"text":193},{"id":254,"depth":282,"text":255},[291,294,296],{"label":292,"href":293},"API Reference","\u002F",{"label":295,"href":277},"Rules",{"label":29},{"cards":298,"onpage":310},[299],{"title":300,"tabs":301},"Evaluate",[302,306],{"label":303,"language":304,"code":305},"cURL","bash","curl https:\u002F\u002Fdeveloper.tagmanifest.com\u002Fv1\u002Fevaluate-rule \\\n  -H \"Authorization: Bearer $TM_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"rule_id\":\"lookup-no-default\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":307,"language":308,"code":309},"MCP","text","User: Run lookup-no-default on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"lookup-no-default\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[311,312,313,314,315],{"id":64,"label":65},{"id":83,"label":84},{"id":97,"label":98},{"id":158,"label":159},{"id":192,"label":193},null,"Lookup table variable has no default value configured, returning undefined for unmatched inputs.","md",{},true,"\u002Frules\u002Flookup-no-default","TechArticle",{"title":5,"description":317},"rules\u002Flookup-no-default",false,"XyjkTIcLwTF3u0M1_oJ1dNIy3tikDr27CmaLkYcyU7M",1796069484240]