var setAnalytics = {}; setAnalytics.getCookie = function(){ return '79615c968eef0b09b19d48241640e712'; } setAnalytics.getIP = function(){ return '54.80.87.166'; } setAnalytics.getHOST = function(){ return 'ec2-54-80-87-166.compute-1.amazonaws.com'; } setAnalytics.getAccessTime = function(){ return '2018/10/24 05:34:01'; } 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);