var _gaq = _gaq || []; //function callGA(accountId, module, page) { function callGA(module, page) { var gaAccId = document.getElementById('lblGAAccountId'); accountId = gaAccId.innerHTML; if (typeof(accountId) != 'undefined' && accountId) { _gaq.push([ '_setAccount', accountId ]); _gaq.push([ '_setDomainName', 'none' ]); _gaq.push([ '_setAllowLinker', true ]); _gaq.push([ '_setSessionCookieTimeout', 6000 ]); if (typeof(page) != 'undefined' && page) { //formulate the page name _gaq.push(['_trackPageview', '/pages/' + module + '/' + page]); } else { _gaq.push([ '_trackPageview' ]); } (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); } }