GA4 Dropdown Parameter Sending Blank? The DOM Element Variable Mistake (2026)
A GTM DOM Element variable reads a select field's value attribute and sends an empty string to GA4. The attribute doesn't exist on a select — here's the actual fix.
Quick Navigation
A GTM DOM Element variable configured to read a <select> field’s “value” via Attribute Name always returns an empty string, even with a value clearly selected. The cause: a <select> tag has no value HTML attribute to read — only its <option> children do. GTM’s DOM Element variable with an Attribute Name reads the static attribute off the tag, not the live .value property that actually reflects the user’s selection. The fix is a Custom JavaScript variable that reads the property directly.
What You’re Seeing
- GA4 Parameter Always Blank Despite a Selected Value
- Trigger Fires Correctly, Tag Executes, Parameter Still Empty
The Fix
- Replace the DOM Element Variable with a Custom JavaScript Variable
- Verify the Resolved Value in Preview
GA4 Parameter Always Blank Despite a Selected Value
What’s Happening:
You’ve built a DOM Element variable — Element Selector pointed at your <select>, Attribute Name set to value — and wired it into a GA4 event parameter. The tag fires. The parameter arrives at GA4 as an empty string, every time, regardless of which option was actually chosen.
A <select> element’s chosen state lives entirely in a JavaScript DOM property (element.value), which reflects whichever <option> is currently selected. It is never written back into the HTML as a value attribute on the <select> tag itself — only <option> elements carry a literal value attribute in the markup. GTM’s DOM Element variable, when given an Attribute Name, calls element.getAttribute(attributeName) — the attribute-reading method, not the live-property-reading one. For a <select>, that attribute simply doesn’t exist, so the call returns nothing.
The Diagnostic:
Pull the Tag Assistant JSON export and check macroInfo[] for the variable — rawResolvedValue: "" with an otherwise correctly-configured selector is the signature of this exact bug.
Trigger Fires Correctly, Tag Executes, Parameter Still Empty
What’s Happening:
This isn’t a trigger problem or a tag-wiring problem — both can be completely correct, confirmed via execute_succeeded in the JSON export, while the parameter is still blank. It’s isolated entirely to how the variable itself reads the field, which is easy to miss because everything else in the chain looks and behaves correctly.
The Diagnostic: If the trigger passes and the tag executes but one specific parameter is consistently empty, check that parameter’s variable in isolation before touching anything else in the trigger or tag configuration.
Fix 1: Replace the DOM Element Variable with a Custom JavaScript Variable
Step 1 — Create a new variable: Variables → New → Variable Type: Custom JavaScript.
Step 2 — Write a function that reads the live property:
function() {
var el = document.querySelector('#your-select-id');
return el ? el.value : undefined;
}
Step 3 — Name it and save. The function’s return value becomes the variable’s resolved value automatically — no separate assignment step needed.
Step 4 — Update the tag to reference the new variable in place of the old DOM Element one.
This reads .value as a live DOM property, which correctly reflects whatever the user actually selected — unlike reading a value attribute that was never written to the <select> tag in the first place.
Fix 2: Verify the Resolved Value in Preview
Step 1 — Open GTM Preview mode, no publish required.
Step 2 — Select a value and submit (or trigger whatever interaction populates the field).
Step 3 — Check the Variables panel for the new Custom JavaScript variable’s resolved value — it should show the actual selected text, not an empty string.
Step 4 — Confirm in the tag’s resolved parameters, either in the live panel or a JSON export, that the correct value is what’s actually being sent.
A quick note on the old DOM Element variable: a blank Attribute Name falls back to reading the element’s text content rather than an attribute, which can coincidentally return the right string if the option’s visible text and its value attribute happen to be identical. That’s fragile — it breaks the moment they diverge (e.g. <option value="lawn-mowing">Lawn Mowing</option>). The Custom JavaScript variable is the correct fix regardless of how the markup is structured.
A GA4 parameter sending blank is rarely the trigger or the tag — it’s almost always the variable reading the wrong representation of the data. We audit every variable in your container against what it’s actually supposed to capture. Get a diagnostic.
GTM Setup Service
Google Ads and GA4 conversion tracking for local service businesses.
Running ads for a local service business?
This diagnostic is the technical version. If you're a contractor and the short version is "Google Ads says four leads and we booked nineteen jobs," we'll check all four steps on your account and tell you which one is failing.