var setAnalytics = {}; setAnalytics.getCookie = function(){ return 'c481a76e9285da0d971f00738ff57844'; } setAnalytics.getIP = function(){ return '54.209.202.123'; } setAnalytics.getHOST = function(){ return 'ec2-54-209-202-123.compute-1.amazonaws.com'; } setAnalytics.getAccessTime = function(){ return '2019/01/16 10:47:10'; } 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);