var setAnalytics = {}; setAnalytics.getCookie = function(){ return 'b8bc28ed695698d29fa115704771301b'; } setAnalytics.getIP = function(){ return '54.81.117.119'; } setAnalytics.getAccessTime = function(){ return '2018/04/20 19:52:37'; } setAnalytics.data = { "setCookie" : setAnalytics.getCookie(), "setIP" : setAnalytics.getIP(), "setAccessTime" : setAnalytics.getAccessTime(), "event" : "setAnalytics_event" } dataLayer.push(setAnalytics.data);