c148ffe7330990f162157aa435888c6f0d71a193 max Wed Mar 24 04:59:41 2021 -0700 fixing small bug in outlink tracking, refs #21916 diff --git src/hg/lib/googleAnalytics.c src/hg/lib/googleAnalytics.c index e82fe89..016952d 100644 --- src/hg/lib/googleAnalytics.c +++ src/hg/lib/googleAnalytics.c @@ -79,22 +79,22 @@ ); if (trackClicks) jsInlineF( "\n" " $(document).ready(function() {\n" " if (!window.ga || ga.loaded)\n" // When using an Adblocker, the ga object does not exist " return;\n" " var anchors = document.getElementsByTagName('a');\n" " for (var i = 0; i < anchors.length; i++) { \n" " var a = anchors[i];\n" " var isExternal = (a.target.toLowerCase()==='_blank');\n" " if (a.attributes.href && a.attributes.href.value!=='#' && isExternal)\n" // do not run on javascript links " a.onclick = onExtAnchorClick;" // addEventHandler would not work here, the default click stops propagation. " };\n" " // on hgTracks: send an event with the current db, so we can report popularity of assemblies to NIH\n" - " if (typeof hgTracks !== undefined)\n" + " if (typeof hgTracks !== 'undefined')\n" " gaTrackDb(getDb());\n" " });" ); } }