Commit 2539a19b542d14647e3ec8bc8ea18584ad3d0a87

Authored by Alex Savenko
1 parent 1a3ecccf

ga tests

frontend/views/articles/show.php
@@ -9,13 +9,10 @@ @@ -9,13 +9,10 @@
9 $this->title = $news->meta_title; 9 $this->title = $news->meta_title;
10 $this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title; 10 $this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title;
11 $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]); 11 $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]);
12 -$this->registerJs("  
13 -  
14 - ga('set', 'author', '".$author."');  
15 - ga('send', 'pageview');  
16 -", View::POS_END); 12 +
17 ?> 13 ?>
18 14
  15 +
19 <nav class="bread-crumbs"> 16 <nav class="bread-crumbs">
20 <?= Breadcrumbs::widget([ 17 <?= Breadcrumbs::widget([
21 'links' => [ 18 'links' => [
frontend/views/layouts/main.php
@@ -103,6 +103,7 @@ $this-&gt;registerJs(&quot; @@ -103,6 +103,7 @@ $this-&gt;registerJs(&quot;
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', 'author', 'author');
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" />