﻿// Google analytics helper functions - start //
function _trackPageViewGA(url) {
    //alert(url);
    if (typeof _gaq != 'undefined') {
        _gaq.push(['_trackPageview', url]);
    }
}

function _trackEventGA(category, action) {
    _trackEventGA(category, action, '', '');
}

function _trackEventGA(category, action, label) {
    _trackEventGA(category, action, label, '');
}

function _trackEventGA(category, action, label, value) {
    if (typeof _gaq != 'undefined') {
        _gaq.push(['_trackEvent', category, action, label, value]);
    }
}

function _trackErrorPage(statusCode) {

    var url = "/" + statusCode + ".html?page=" + document.location.pathname + document.location.search + "&from=" + document.referrer + "&time=" + DateTime.now();

    if (typeof _gaq != 'undefined') {
        _gaq.push(['_trackPageview', url]);
    }
}

// Google analytics helper functions - end //
