var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12102916-1']);
_gaq.push(['_setDomainName', '.digi.com.my']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);

(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);
})();
  
function trackOutboundLink(link) {
  _gaq.push(['_trackPageview', document.location.pathname + '/outbound/' + link.href]);
}

function trackDownload(link) {
  _gaq.push(['_setCustomVar', 4, 'form_download', link.href, 2]);
  _gaq.push(['_trackPageview', document.location.pathname + '/download/' + link.href]);
}

function trackPage(pg) {
  _gaq.push(['_trackPageview', document.location.pathname + '/' + pg]);
}

function trackMenuLink(src) {
  _gaq.push(['_trackPageview', document.location.pathname + '?menubar_cat=' + src]);
}
