Google Tag Manager Parse Error. Primary Expression
问题 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. 回答1: To fix the issue in Google tag manger, I simple re wrote the code to be : function() { return document.querySelector(".no-display > input