diff --git a/Classes/Page/Part/FooterPart.php b/Classes/Page/Part/FooterPart.php index ccff2d9..c53ec4e 100644 --- a/Classes/Page/Part/FooterPart.php +++ b/Classes/Page/Part/FooterPart.php @@ -158,8 +158,10 @@ public function buildGoogleAnalyticsCode(array $tsServices, array $gaConf) $this->cObj->data['gaCode'] = $gaCode; $this->cObj->data['gaIsAnonymize'] = (int)!empty($gaConf['anonymizeIp']); $this->cObj->data['gaDomainName'] = $gaConf['domainName']; + $this->cObj->data['gaOptOutCode'] = (int)!empty($gaConf['optoutCode']); $this->cObj->data['gaCustomizationCode'] = $customCode; $this->cObj->data['gaUseUniversalAnalytics'] = (int)!empty($gaConf['universalAnalytics']); + // Build code $ret[] = $this->cObj->cObjGetSingle($gaConf['template'], $gaConf['template.']); diff --git a/Configuration/TypoScript/constants.txt b/Configuration/TypoScript/constants.txt index 77a3922..9c3c74f 100644 --- a/Configuration/TypoScript/constants.txt +++ b/Configuration/TypoScript/constants.txt @@ -127,7 +127,9 @@ plugin.metaseo { services.googleAnalytics.domainName = # cat=plugin.metaseo.services/page/08; type=boolean; label= Google Analytics Anonymize IP: Enable anonymize IP services.googleAnalytics.anonymizeIp = 0 - # cat=plugin.metaseo.services/page/09; type=boolean; label= Google Analytics Track Downloads: Track downloads (with javascript) (BETA!) + # cat=plugin.metaseo.services/page/09; type=boolean; label= Google Analytics Opt-Out-Code: Enable Opt-Out-Code + services.googleAnalytics.optoutCode = 0 + # cat=plugin.metaseo.services/page/10; type=boolean; label= Google Analytics Track Downloads: Track downloads (with javascript) (BETA!) services.googleAnalytics.trackDownloads = 0 # cat=plugin.metaseo.services/page/11; type=string; label= Piwik URL: Url to your piwik installation (eg. www.example.com/piwik/ - don't use http:// or https:// as prefix!) diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt index eda0341..4cb2b31 100644 --- a/Configuration/TypoScript/setup.txt +++ b/Configuration/TypoScript/setup.txt @@ -376,6 +376,8 @@ plugin.metaseo { anonymizeIp = {$plugin.metaseo.services.googleAnalytics.anonymizeIp} domainName = {$plugin.metaseo.services.googleAnalytics.domainName} + + optoutCode = {$plugin.metaseo.services.googleAnalytics.optoutCode} trackDownloads = {$plugin.metaseo.services.googleAnalytics.trackDownloads} trackDownloadsScript = EXT:metaseo/Resources/Public/Frontend/JavaScript/GoogleAnalyticsTrackDownload.js @@ -398,10 +400,13 @@ plugin.metaseo { gaIsAnonymize = TEXT gaIsAnonymize.field = gaIsAnonymize - + gaDomainName = TEXT gaDomainName.field = gaDomainName + gaOptOutCode = TEXT + gaOptOutCode.field = gaOptOutCode + gaUseUniversalAnalytics = TEXT gaUseUniversalAnalytics.field = gaUseUniversalAnalytics } diff --git a/Resources/Private/Templates/PageParts/ServiceGoogleAnalytics.html b/Resources/Private/Templates/PageParts/ServiceGoogleAnalytics.html index de2c7c4..8936cfa 100644 --- a/Resources/Private/Templates/PageParts/ServiceGoogleAnalytics.html +++ b/Resources/Private/Templates/PageParts/ServiceGoogleAnalytics.html @@ -1,5 +1,16 @@ + + + +