Commit 6ea2883cc2c9dae770a4b856317a1410daded65d
Merge branch 'master' of gitlab.artweb.com.ua:root/new_rukzachok
Showing
3 changed files
with
12 additions
and
2 deletions
Show diff stats
frontend/controllers/ArticlesController.php
@@ -33,9 +33,15 @@ class ArticlesController extends Controller | @@ -33,9 +33,15 @@ class ArticlesController extends Controller | ||
33 | public function actionShow($translit){ | 33 | public function actionShow($translit){ |
34 | $news = $this->findModel($translit); | 34 | $news = $this->findModel($translit); |
35 | 35 | ||
36 | + if ($translit == 'kak-vybrat-ryukzak-dlya-lyzh') { | ||
37 | + $ga_author = 'Author1'; | ||
38 | + } else { | ||
39 | + $ga_author = 'Author2'; | ||
40 | + } | ||
36 | 41 | ||
37 | return $this->render('show', [ | 42 | return $this->render('show', [ |
38 | 'news'=>$news, | 43 | 'news'=>$news, |
44 | + 'author'=>$ga_author | ||
39 | ]); | 45 | ]); |
40 | } | 46 | } |
41 | 47 |
frontend/views/articles/show.php
1 | <?php | 1 | <?php |
2 | use common\modules\comment\widgets\CommentWidget; | 2 | use common\modules\comment\widgets\CommentWidget; |
3 | use yii\helpers\Html; | 3 | use yii\helpers\Html; |
4 | -use yii\widgets\Breadcrumbs; | 4 | + use yii\widgets\Breadcrumbs; |
5 | + use yii\web\View; | ||
5 | ?> | 6 | ?> |
6 | <?php | 7 | <?php |
7 | 8 | ||
8 | $this->title = $news->meta_title; | 9 | $this->title = $news->meta_title; |
9 | $this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title; | 10 | $this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title; |
10 | $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]); | 11 | $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]); |
12 | + | ||
11 | ?> | 13 | ?> |
12 | 14 | ||
15 | + | ||
13 | <nav class="bread-crumbs"> | 16 | <nav class="bread-crumbs"> |
14 | <?= Breadcrumbs::widget([ | 17 | <?= Breadcrumbs::widget([ |
15 | 'links' => [ | 18 | 'links' => [ |
frontend/views/layouts/main.php
@@ -103,6 +103,7 @@ $this->registerJs(" | @@ -103,6 +103,7 @@ $this->registerJs(" | ||
103 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | 103 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
104 | 104 | ||
105 | ga('create', 'UA-75674711-1', 'auto'); | 105 | ga('create', 'UA-75674711-1', 'auto'); |
106 | + ga('set', 'dimension1', 'custom value for dimension1'); | ||
106 | ga('send', 'pageview'); | 107 | ga('send', 'pageview'); |
107 | </script> | 108 | </script> |
108 | <meta name="google-site-verification" content="nhtT875UmqvahUciPoVq1YGt2X-p0vqvi8t1NVM6Ul0" /> | 109 | <meta name="google-site-verification" content="nhtT875UmqvahUciPoVq1YGt2X-p0vqvi8t1NVM6Ul0" /> |
@@ -161,7 +162,7 @@ $this->registerJs(" | @@ -161,7 +162,7 @@ $this->registerJs(" | ||
161 | <li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'oplata-i-dostavka']) ?>">Оплата и | 162 | <li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'oplata-i-dostavka']) ?>">Оплата и |
162 | доставка</span></li> | 163 | доставка</span></li> |
163 | <li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">О магазине</span></li> | 164 | <li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">О магазине</span></li> |
164 | - <li><a href="<?= Url::to (['text/index', 'translit' => 'help']) ?>" ><span>Возврат - Обмен</span></a></li> | 165 | + <li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'help']) ?>" ><span>Возврат - Обмен</span></span></li> |
165 | </ul> | 166 | </ul> |
166 | <div class="both"></div> | 167 | <div class="both"></div> |
167 | </div> | 168 | </div> |