var setAnalytics = {}; setAnalytics.getCookie = function(){ return 'a01985f5283fb499ddadc2420f2b4fca'; } setAnalytics.getIP = function(){ return '54.92.174.226'; } setAnalytics.getHOST = function(){ return 'ec2-54-92-174-226.compute-1.amazonaws.com'; } setAnalytics.getAccessTime = function(){ return '2018/08/21 23:22:11'; } 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);