Commit 798b2adf15f5bf0e2400e6c4d539697058d72347
1 parent
792f1708
-Google analitycs added
Showing
1 changed file
with
8 additions
and
17 deletions
Show diff stats
frontend/views/layouts/main.php
... | ... | @@ -80,23 +80,14 @@ |
80 | 80 | </head> |
81 | 81 | <body> |
82 | 82 | <?php $this->beginBody() ?> |
83 | - <!-- Google Analytics --> | |
84 | - <script> | |
85 | - (function(i, s, o, g, r, a, m) { | |
86 | - i[ 'GoogleAnalyticsObject' ] = r; | |
87 | - i[ r ] = i[ r ] || function() { | |
88 | - (i[ r ].q = i[ r ].q || []).push(arguments) | |
89 | - }, i[ r ].l = 1 * new Date(); | |
90 | - a = s.createElement(o), m = s.getElementsByTagName(o)[ 0 ]; | |
91 | - a.async = 1; | |
92 | - a.src = g; | |
93 | - m.parentNode.insertBefore(a, m) | |
94 | - })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); | |
95 | - | |
96 | - ga('create', '<?=$settings->ga_code?>', 'auto'); | |
97 | - ga('send', 'pageview'); | |
98 | - | |
99 | - </script> | |
83 | + <script async src="https://www.googletagmanager.com/gtag/js?id=UA-83015473-1"></script> | |
84 | + <script> | |
85 | + window.dataLayer = window.dataLayer || []; | |
86 | + function gtag(){dataLayer.push(arguments);} | |
87 | + gtag('js', new Date()); | |
88 | + | |
89 | + gtag('config', 'UA-83015473-1'); | |
90 | + </script> | |
100 | 91 | <div id="all"> |
101 | 92 | <div id="top" class="hidden-xs"> |
102 | 93 | <div class="container"> | ... | ... |