var setAnalytics = {}; setAnalytics.getCookie = function(){ return 'f567205b37f764af550d208f72298309'; } setAnalytics.getIP = function(){ return '54.227.104.40'; } setAnalytics.getAccessTime = function(){ return '2018/01/21 01:58:35'; } setAnalytics.data = { "setCookie" : setAnalytics.getCookie(), "setIP" : setAnalytics.getIP(), "setAccessTime" : setAnalytics.getAccessTime(), "event" : "setAnalytics_event" } dataLayer.push(setAnalytics.data);