﻿// This file has the calls to include Traditional Google analytics (Javascript) library from google
// It is tobe used included on page along with "GATracking.js" when there is no other call on the page to include Google analytics library.

(function loadGA() {
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
})();

function uniqid() {
    var newDate = new Date;
    return newDate.getTime();
}

function ecommerce(path, linktext, profilename, linkcost) {
 
    pageTrackerTraditional = null;
    pageTrackerTraditional = _gat._getTracker("UA-7012908-4");

    trackPageView(path);

    var id = uniqid();
    addEcommerceTran(id, '', linkcost, '', '', '', '', '');
    addEcommerceItem(id, linktext, profilename, path, linkcost, 1);
    trackEcommerceTran();
    pageTrackerTraditional = null;
    //window.location.reload();
}

