c831b5f0f3b9350cdf5275397d30c3a4dc1b8e200534113d776cc39e567424c2

Source Code:

; (function (jQuery, undefined) {
    if (typeof jQuery != 'undefined') {
        jQuery(function () {
            if (typeof ga != 'undefined') {
                var filetypes = /modules\/media\/\?do=download/i;
                var baseHref = '';
                if (jQuery('base').attr('href') != undefined)
                    baseHref = jQuery('base').attr('href');

                jQuery('a, a[rel="track-me"]').each(function () {
                    var $anchor = jQuery(this);

                    var href = jQuery(this).attr('href');
                    if (href && $anchor.attr('rel') == 'track-me') {
                        $anchor.click(function () {
                        
                            var eventCategory = $anchor.attr('data-track-category') || 'Link';
                            var eventAction = $anchor.attr('data-track-action') || 'Click';
                            var eventLabel = $anchor.attr('data-track-label') || $anchor.text();
                            var eventValue = $anchor.attr('data-track-value') || '';
                            if (!isNaN(eventValue)) {
                                ga('send', 'event', {
                                    eventCategory: eventCategory,
                                    eventAction: eventAction,
                                    eventLabel: eventLabel,
                                    eventValue: eventValue
                                });
                            }
                            else {
                                ga('send', 'event', {
                                    eventCategory: eventCategory,
                                    eventAction: eventAction
                                });
                            }
                            if (jQuery(this).attr('target') != undefined && jQuery(this).attr('target').toLowerCase() != '_blank') {
                                setTimeout(function () { location.href = href; }, 200);
                                return false;
                            }
                            setTimeout(function () { location.href = href; }, 200);
                            return false;
                        });
                    }
                    else if (href && (href.match(/^https?\:/i)) && (!href.match(document.domain))) {
                        /*jQuery(this).click(function () {
                            var extLink = href.replace(/^https?\:\/\//i, '');
                            ga('send', 'event', 'External', 'Click', extLink);
                            if (jQuery(this).attr('target') != undefined && jQuery(this).attr('target').toLowerCase() != '_blank') {
                                setTimeout(function () { location.href = href; }, 200);
                                return false;
                            }
                        });*/
                        // NCS-2311 Moved this to CommonExternalLinks because of a conflict
                    }
                    else if (href && href.match(/^mailto\:/i)) {
                        jQuery(this).click(function () {
                            var mailLink = href.replace(/^mailto\:/i, '');
                            ga('send', 'event', 'Email', 'Click', mailLink);
                        });
                    }
                    else if (href && href.match(filetypes)) {
                        jQuery(this).click(function () {

                            var filePath = href;
                            ga('send', 'event', 'Download', 'Click-File', $(this).text());
                            if (jQuery(this).attr('target') != undefined && jQuery(this).attr('target').toLowerCase() != '_blank') {
                                setTimeout(function () { location.href = baseHref + href; }, 200);
                                return false;
                            }
                        });
                    }

                });
            }
        });
    }
})(jQuery);