ADD цели для метрики

This commit is contained in:
Krivchikov Dmitry 2016-07-06 16:56:42 +03:00
parent 2fe170c341
commit 00a808c5dd
3 changed files with 13 additions and 0 deletions

View File

@ -91,6 +91,7 @@ class JsonController extends Controller
$point->photosCount = $photosCount;
$point->inFavorites = Favorite::model()->checkIsMy($id);
$point->iLike = Like::model()->checkIsMy($id);
$point->isPaid = in_array($point->categoryId, Category::$paidIds);
self::renderPartial('json.php', $point->getValues());
} else {

View File

@ -382,6 +382,12 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) {
}
}, 200);
yaCounter24682772.reachGoal('VIEW_POINT');
if (data.isPaid == true) {
yaCounter24682772.reachGoal('VIEW_PAID_POINT');
}
return true;
}

View File

@ -296,4 +296,10 @@ if ($pointsAirport && $usersAirport && $pointsAirport->id != $usersAirport->id){
$('.extraHolder').hide();
$('.extraData').show();
}
<?php if (in_array($point->categoryId, Category::$paidIds)): ?>
$(document).ready(function(){
yaCounter24682772.reachGoal('VIEW_PAID_POINT');
})
<?php endif; ?>
</script>