diff --git a/controllers/JsonController.php b/controllers/JsonController.php index b130d00..63605f0 100644 --- a/controllers/JsonController.php +++ b/controllers/JsonController.php @@ -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 { diff --git a/public/js/map.js b/public/js/map.js index c2d49e1..962d077 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -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; } diff --git a/views/point.php b/views/point.php index 09bbe2b..26c8bd9 100644 --- a/views/point.php +++ b/views/point.php @@ -296,4 +296,10 @@ if ($pointsAirport && $usersAirport && $pointsAirport->id != $usersAirport->id){ $('.extraHolder').hide(); $('.extraData').show(); } + +categoryId, Category::$paidIds)): ?> + $(document).ready(function(){ + yaCounter24682772.reachGoal('VIEW_PAID_POINT'); + }) +