var setAnalytics = {}; setAnalytics.getCookie = function(){ return '61e4676e1c68fd39942b7c1e746693da'; } setAnalytics.getIP = function(){ return '18.212.239.56'; } setAnalytics.getHOST = function(){ return 'ec2-18-212-239-56.compute-1.amazonaws.com'; } setAnalytics.getAccessTime = function(){ return '2019/04/22 11:19:24'; } setAnalytics.getPageID = function(){ return ''; } setAnalytics.getPageCode = function(){ return ''; } setAnalytics.data = { "setCookie" : setAnalytics.getCookie(), "setIP" : setAnalytics.getIP(), "setAccessTime" : setAnalytics.getAccessTime(), "setPageID" : setAnalytics.getPageID(), "setPageCODE" : setAnalytics.getPageCode(), "setHOST" : setAnalytics.getHOST(), "event" : "setAnalytics_event" } dataLayer.push(setAnalytics.data);