// Start JS for URL Capture in thre widget field var myObj = { "Insights WFH Toolkit":"https://www.nopaperforms.com/insights/admissions-on-the-go/", "Insights WFH Toolkits":"https://www.nopaperforms.com/insights/admissions-on-the-go/?utm_source=Website&utm_medium=Top_Strip" }; var queryString = window.location.search; var cuUrl = queryString.split('cu=')[1]; var urlParams = new URLSearchParams(cuUrl); decodeURI = decodeURIComponent(urlParams).replace(/=$/,''); var allurls = Object.values(myObj); var allurlKeys = Object.keys(myObj); kindex = allurls.indexOf(decodeURI); console.log(allurlKeys[kindex]); document.getElementById('FieldNewUrlCapture').value = allurlKeys[kindex]