From: <hs...@us...> - 2011-10-05 15:49:10
|
Revision: 968 http://treebase.svn.sourceforge.net/treebase/?rev=968&view=rev Author: hshyket Date: 2011-10-05 15:49:04 +0000 (Wed, 05 Oct 2011) Log Message: ----------- Fixing analytics script Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/googleAnalytics.js Modified: trunk/treebase-web/src/main/webapp/scripts/googleAnalytics.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/googleAnalytics.js 2011-10-05 13:47:19 UTC (rev 967) +++ trunk/treebase-web/src/main/webapp/scripts/googleAnalytics.js 2011-10-05 15:49:04 UTC (rev 968) @@ -19,10 +19,13 @@ //protocol, host, hostname, port, pathname, search, hash if (hrefs[l].protocol == "mailto:") { startListening(hrefs[l],"click",trackMailto); - } else if (hrefs[l].hostname == location.host) { + //} else if (hrefs[l].hostname == location.host) { + } else if (true) { var path = hrefs[l].pathname + hrefs[l].search; - var isDoc = path.match(/\.(?:doc|eps|jpg|png|svg|xls|ppt|pdf|xls|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3|nex|downloadATree|downloadANexusFile|downloadAMatrix|downloadANexusFile|downloadAnAnalysisStep)($|\&|\?)/); - if (isDoc) { + var pathFile = hrefs[l].pathname; + var isDoc = path.match(/\.(?:doc|eps|jpg|png|svg|xls|ppt|pdf|xls|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3|nex)($|\&|\?)/); + var isDownload = pathFile.match(/(?:downloadATree|downloadANexusFile|downloadAMatrix|downloadANexusFile|downloadAnAnalysisStep)/); + if (isDoc || isDownload) { startListening(hrefs[l],"click",trackDownloads); } } else if (hrefs[l].hostname != location.hostname) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |