Pour ma part j'utilise un script fait maison :
<?php
require(dirname(__FILE__).'/config/config.inc.php');
/*******************************************************************************
********** Supression des Stats appelé par Cron *******************************
*******************************************************************************/
// nbr de jours à conserver
$days=180; //connections etc ...
$day_page=180; //page viewed
// nbr de guest à conserver
$nbGuest=5000;
$interval=$days.' DAY';
//1- ps_connections_pages delete
$res=Db::getInstance()->Execute('
DELETE FROM `'._DB_PREFIX_.'connections_page`
WHERE time_start < DATE_SUB(NOW(), INTERVAL '.$interval.')');
if(!$res)
die('error delete ps_connections_pages for '.$days.' day(s)');
//2- ps_connections delete
$res=Db::getInstance()->Execute('
DELETE FROM `'._DB_PREFIX_.'connections`
WHERE date_add < DATE_SUB(NOW(), INTERVAL '.$interval.')');
if(!$res)
die('error delete ps_connections for '.$days.' day(s)');
//3- ps_connections_source delete
$res=Db::getInstance()->Execute('
DELETE FROM `'._DB_PREFIX_.'connections_source`
WHERE date_add < DATE_SUB(NOW(), INTERVAL '.$interval.')');
if(!$res)
die('error delete ps_connections_source for '.$days.' day(s)');
//4- ps_page_viewed delete
$currentRange=DateRange::getCurrentRange();
$endRange = $currentRange-$day_page;
$res=Db::getInstance()->Execute('
DELETE FROM `'._DB_PREFIX_.'page_viewed`
WHERE id_date_range < '.$endRange);
if(!$res)
die('error delete ps_page_viewed for '.$endRange.' date_range');
//5- ps_guest delete
$sql="SELECT `id_guest` FROM `ps_guest` ORDER BY `id_guest` DESC LIMIT 0, 1";
$res = Db::getInstance()->ExecuteS($sql);
if(!$res)
die('error select highest ps_guest');
$currentGuest=$res[0]['id_guest'];
$endGuest = $currentGuest-$nbGuest;
$res=Db::getInstance()->Execute('
DELETE FROM `'._DB_PREFIX_.'guest`
WHERE id_guest < '.$endGuest);
if(!$res)
die('error delete ps_guest for '.$endGuest.' endGuest');