Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0359e12555 |
@@ -61,7 +61,7 @@ class BannerHelper {
|
||||
|
||||
|
||||
private static function getBannerImpressions($bannerIds) {
|
||||
$time = strtotime("today CET");
|
||||
$time = strtotime("today");
|
||||
$stats = GlobalVariables::get("dao")->query(
|
||||
BannerStatsModel::class,
|
||||
[
|
||||
|
||||
@@ -193,7 +193,7 @@ class PipelineHelper {
|
||||
'statType'=>StatisticModel::STAT_TYPE_BANNER_IMPRESSION,
|
||||
'content.position'=>$position,
|
||||
// 'date'=>array( '$gte'=>new MongoDate(strtotime("today")) )
|
||||
'date'=>array( '$gte'=>new MongoDB\BSON\UTCDateTime(strtotime("today CET") * 1000) )
|
||||
'date'=>array( '$gte'=>new MongoDB\BSON\UTCDateTime(strtotime("today") * 1000) )
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
||||
@@ -28,7 +28,7 @@ class ArticleStatsModel extends Model {
|
||||
}
|
||||
|
||||
public static function getFilter($articleId, $day, $month, $year) {
|
||||
$time = strtotime("$year-$month-$day CET");
|
||||
$time = strtotime("$year-$month-$day");
|
||||
return [
|
||||
'notizia' => $articleId,
|
||||
'time' => new MongoDB\BSON\UTCDateTime( $time * 1000 ),
|
||||
|
||||
@@ -16,7 +16,7 @@ class BannerStatsModel extends Model {
|
||||
}
|
||||
|
||||
public static function new($bannerId, $day, $month, $year) {
|
||||
$time = strtotime("$year-$month-$day CET");
|
||||
$time = strtotime("$year-$month-$day");
|
||||
return new static(
|
||||
(object)[
|
||||
'banner' => $bannerId,
|
||||
@@ -30,7 +30,7 @@ class BannerStatsModel extends Model {
|
||||
);
|
||||
}
|
||||
public static function getFilter($bannerId, $day, $month, $year) {
|
||||
$time = strtotime("$year-$month-$day CET");
|
||||
$time = strtotime("$year-$month-$day");
|
||||
return [
|
||||
'banner' => $bannerId,
|
||||
'time' => new MongoDB\BSON\UTCDateTime( $time * 1000 ),
|
||||
|
||||
@@ -15,7 +15,7 @@ class PageViewStatsModel extends Model {
|
||||
return "pageview_stats";
|
||||
}
|
||||
public static function new($page, $day, $month, $year) {
|
||||
$time = strtotime("$year-$month-$day CET");
|
||||
$time = strtotime("$year-$month-$day");
|
||||
|
||||
return new static(
|
||||
(object)[
|
||||
@@ -33,7 +33,7 @@ class PageViewStatsModel extends Model {
|
||||
}
|
||||
|
||||
public static function getFilter($page, $day, $month, $year) {
|
||||
$time = strtotime("$year-$month-$day CET");
|
||||
$time = strtotime("$year-$month-$day");
|
||||
return [
|
||||
'page' => $page,
|
||||
'time' => new MongoDB\BSON\UTCDateTime( $time * 1000 ),
|
||||
|
||||
@@ -381,7 +381,7 @@ class GUIHandler {
|
||||
|
||||
$stats = GlobalVariables::get("dao")->aggregate(
|
||||
ArticleStatsModel::class,
|
||||
PipelineHelper::getMostViewedOfLastDays(strtotime("-7 days CET"),5)
|
||||
PipelineHelper::getMostViewedOfLastDays(strtotime("-7 days"),5)
|
||||
);
|
||||
$idArray = array_map(function ($ele){ return new MongoDB\BSON\ObjectID($ele["notizia"]);}, $stats);
|
||||
|
||||
|
||||
@@ -72,13 +72,13 @@ try{
|
||||
<div class="bannerStat">
|
||||
<div>
|
||||
<div class="statName">Oggi</div>
|
||||
<div>Visualizzazioni: <?php echo AnalyticsHelper::countBannerImpressions($banner->id,strtotime("today CET"));?></div>
|
||||
<div class="toHide">Click: <?php echo AnalyticsHelper::countBannerClicks($banner->id,strtotime("today CET"));?></div>
|
||||
<div>Visualizzazioni: <?php echo AnalyticsHelper::countBannerImpressions($banner->id,strtotime("today"));?></div>
|
||||
<div class="toHide">Click: <?php echo AnalyticsHelper::countBannerClicks($banner->id,strtotime("today"));?></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="statName">Ultima settimana</div>
|
||||
<div>Visualizzazioni: <?php echo AnalyticsHelper::countBannerImpressions($banner->id,strtotime("-7 days CET"));?></div>
|
||||
<div class="toHide">Click: <?php echo AnalyticsHelper::countBannerClicks($banner->id,strtotime("-7 days CET"));?></div>
|
||||
<div>Visualizzazioni: <?php echo AnalyticsHelper::countBannerImpressions($banner->id,strtotime("-7 days"));?></div>
|
||||
<div class="toHide">Click: <?php echo AnalyticsHelper::countBannerClicks($banner->id,strtotime("-7 days"));?></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="statName">Totali</div>
|
||||
|
||||
@@ -144,11 +144,11 @@ try{
|
||||
<div class="notiziaStat">
|
||||
<div>
|
||||
<div class="statName">Oggi</div>
|
||||
<div><?php echo AnalyticsHelper::countNotiziaImpressions($notizia->id,strtotime("today CET"));?></div>
|
||||
<div><?php echo AnalyticsHelper::countNotiziaImpressions($notizia->id,strtotime("today"));?></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="statName">Ultima settimana</div>
|
||||
<div><?php echo AnalyticsHelper::countNotiziaImpressions($notizia->id,strtotime("-7 days CET"));?></div>
|
||||
<div><?php echo AnalyticsHelper::countNotiziaImpressions($notizia->id,strtotime("-7 days"));?></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="statName">Totali</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ try {
|
||||
|
||||
if (!is_null($ip) && !is_null($banners) && !is_null($source)){
|
||||
$banners = explode(",", $banners);
|
||||
$ts = strtotime('today CET');
|
||||
$ts = strtotime('today');
|
||||
|
||||
foreach ($banners as $banner) {
|
||||
AnalyticsHelper::bannerImpression(
|
||||
|
||||
Reference in New Issue
Block a user