var setAnalytics = {}; setAnalytics.getCookie = function(){ return '1d581b0e75837db8eafbb084cb0fd4c3'; } setAnalytics.getIP = function(){ return '54.167.29.208'; } setAnalytics.getHOST = function(){ return 'ec2-54-167-29-208.compute-1.amazonaws.com'; } setAnalytics.getAccessTime = function(){ return '2018/02/23 01:54:40'; } 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);