Given that I have the following script, how can I append/use varible portVal
in the object i.e "investment_value": portVal
var portVal = 100000 setTimeout(invalidForm, 2000); function invalidForm() { utag.link({ "event_name": "invalid form submission", "investment_value": portVal, "page_title": "Calculator - Invalid form submission", "error_message": "Mandatory fields", "language": "en", "country": "Test", "segment": "Test", "sub_segment":"Test" }); }
How do I console.log
that object's investment_value
?