I am trying to save this Custom Javascript Variable within Google Tag Manager and return this error each time:
Error at line 2, character 4: Parse error. primary expression expected
var prodID = function pID() {
return document.querySelector(".no-display > input[name=product]").value;
}();
Can someone help me? I believe I have a primary expression.