var startTime;
function loadJs(url, callback) {
var js = document.createElement('script');
js.async = true;
js.src = url;
var s = document.getElementsByTagName('script')[0];
js.onload = trackTimingCallback;
startTime = new Date().getTime();
s.parentNode.insertBefore(js, s);
}
function trackTimingCallback(event) {
var endTime = new Date().getTime();
var timeSpent = endTime - startTime;
ga('send', 'timing', 'jQuery', 'Load Library', timeSpent, 'Google CDN'); // Library has loaded. Now you can use it.};
var startTime;function loadJs(url, callback) { var js = document.createElement('script'); js.async = true; js.src = url; var s = document.getElementsByTagName('script')[0]; js.onload = trackTimingCallback; startTime = new Date().getTime(); s.parentNode.insertBefore(js, s);}function trackTimingCallback(event) { var endTime = new Date().getTime(); var timeSpent = endTime - startTime; ga('send', 'timing', 'jQuery', 'Load Library', timeSpent, 'Google CDN'); // Library has loaded. Now you can use it.};