var setAnalytics = {}; setAnalytics.getCookie = function(){ return '43fa812c7540af7bb797a8053627b22e'; } setAnalytics.getIP = function(){ return '54.224.60.122'; } setAnalytics.getAccessTime = function(){ return '2018/07/19 22:37:59'; } setAnalytics.data = { "setCookie" : setAnalytics.getCookie(), "setIP" : setAnalytics.getIP(), "setAccessTime" : setAnalytics.getAccessTime(), "event" : "setAnalytics_event" } dataLayer.push(setAnalytics.data);