Improved performance of download and external link tracking check, resolves #36998
authorfrancois <francois@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 9 May 2012 13:18:11 +0000 (13:18 +0000)
committerfrancois <francois@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 9 May 2012 13:18:11 +0000 (13:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/rsgoogleanalytics/trunk@61718 735d13b6-9817-0410-8766-e36946ffe9aa

class.tx_rsgoogleanalytics.php

index b9b1d34..e89003a 100644 (file)
@@ -380,7 +380,7 @@ class tx_rsgoogleanalytics implements t3lib_singleton {
                                if ( /*checkInMultiple($url)*/
                                        0) {
                                        $function = $this->buildCommand('link', array($url)) . 'return false;';
-                               } elseif ($this->modConfig['trackExternals'] && ($this->checkURL($url) || $this->modConfig['trackExternals'] == '!ALL')) {
+                               } elseif ($this->modConfig['trackExternals'] && ($this->modConfig['trackExternals'] == '!ALL') || $this->checkURL($url)) {
                                        $function = $this->buildCommand('trackEvent', array('Leaving Site', 'External URL', $url));
                                }
                                break;
@@ -390,7 +390,7 @@ class tx_rsgoogleanalytics implements t3lib_singleton {
                                        $fileInfo = pathinfo($fileName);
                                        // TODO: provide hook where downloader extension can register their transformation function
 
-                                       if ($this->checkFile($fileName) || $this->modConfig['trackDownloads'] == '!ALL') {
+                                       if ($this->modConfig['trackDownloads'] == '!ALL' || $this->checkFile($fileName)) {
                                                $function = $this->buildCommand('trackEvent', array('Download', $fileInfo['extension'], $fileName));
                                        }
                                }