var setAnalytics = {}; setAnalytics.getCookie = function(){ return 'e73072b7acb508b01cac3183fc72c2ce'; } setAnalytics.getIP = function(){ return '54.234.190.237'; } setAnalytics.getHOST = function(){ return 'ec2-54-234-190-237.compute-1.amazonaws.com'; } setAnalytics.getAccessTime = function(){ return '2018/01/22 06:59:36'; } 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);