Skip to content
Snippets Groups Projects
Commit 9d00a34e authored by khawkins's avatar khawkins
Browse files

Missed block of code

parent 3be24fce
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,19 @@
*/
// Analytics tracking
// This code tracks the user's clicks in various parts of the EBI site and logs them as GA events.
// Links in non-generic regions can be tracked by adding '.track-with-analytics-events' to a parent div. Careful with the scoping.
// -------------
var ga = ga || [];
if (ga.loaded) { jQuery('body').addClass('google-analytics-loaded'); } // Confirm GA is loaded, add a class if found
// Utility method
if (!Array.prototype.last){
Array.prototype.last = function(){
return this[this.length - 1];
};
};
function analyticsTrackInteraction(actedOnItem, parentContainer) {
var linkName = jQuery(actedOnItem).text().toString();
// if there's no text, it's probably and image...
......@@ -95,19 +107,6 @@ if (jQuery('body').hasClass('google-analytics-loaded')) {
});
// Analytics tracking
// This code tracks the user's clicks in various parts of the EBI site and logs them as GA events.
// Links in non-generic regions can be tracked by adding '.track-with-analytics-events' to a parent div. Careful with the scoping.
var ga = ga || [];
if (ga.loaded) { jQuery('body').addClass('google-analytics-loaded'); } // Confirm GA is loaded, add a class if found
// Utility method
if (!Array.prototype.last){
Array.prototype.last = function(){
return this[this.length - 1];
};
};
$.fn.foundationExtendEBI = function() {
// Insert EMBL dropdown menu
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment