wacon-internet-gmbh / wacon_cookie_management

WCM ist eine TYPO3 Extension, die es den Besuchern Ihrer Website erlaubt, die benutzten Cookie-Einstellungen selber zu kontrollieren.
https://www.wacon.de
GNU General Public License v2.0
10 stars 7 forks source link

[FEATURE] It is useful to enable/disable Cookie statistica #68

Closed christophrunkel closed 1 year ago

christophrunkel commented 1 year ago

What feature do you miss?

In high-traffic websites the statistics cause a lot of database transfer, and the statistic table gets huge pretty soon.

Describe the solution you would like

I would add a setting in the typoscript template:

plugin.tx_waconcookiemanagement_cookiefreigabe.enableStatistics = 1

And have an if condition at line 74 in the CookieController

```
if ($this->settings['enableStatistics']==1)
    {
    $newStat = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Waconcookiemanagement\WaconCookieManagement\Domain\Model\Stat::class);
    if($cookieneu=='min') $newStat->setCookieconfig('min');
    elseif($cookieneu=='max') $newStat->setCookieconfig('max');
    else $newStat->setCookieconfig('custom');
    $newStat->setSeite($GLOBALS["TSFE"]->id);

    $newStat->setPid($GLOBALS['TSFE']->rootLine[0]['uid']);
    $cookies0 = $this->cookieRepository->findByKategorie(0);
    $this->statRepository->add($newStat);
    }
PKuhlmay commented 1 year ago

Hi @christophrunkel Thanks for this. We will get into it.

kuschmitt commented 1 year ago

With Version 3.4.0 you can select, how many days you can have in yout statistic. If you store the Data for 0 days, no statistics data will be added to the database Activate statistics (Store data für xxx days)[plugin.tx_waconcookiemanagement_cookiefreigabe.settings.statisticsDays] (Integer)