var setAnalytics = {}; setAnalytics.getCookie = function(){ return '12a1d9243011e44b9f0fb043774efa64'; } setAnalytics.getIP = function(){ return '3.84.186.122'; } setAnalytics.getAccessTime = function(){ return '2019/01/21 07:04:15'; } setAnalytics.data = { "setCookie" : setAnalytics.getCookie(), "setIP" : setAnalytics.getIP(), "setAccessTime" : setAnalytics.getAccessTime(), "event" : "setAnalytics_event" } dataLayer.push(setAnalytics.data);