Commit f88dd1393dc2a234db1c4cde19ad596fece79262
1 parent
f4356275
g_analitics
Showing
1 changed file
with
8 additions
and
16 deletions
Show diff stats
frontend/views/layouts/main.php
@@ -65,23 +65,15 @@ | @@ -65,23 +65,15 @@ | ||
65 | </head> | 65 | </head> |
66 | <body> | 66 | <body> |
67 | <?php $this->beginBody() ?> | 67 | <?php $this->beginBody() ?> |
68 | - <!-- Google Analytics --> | ||
69 | - <script> | ||
70 | - (function(i, s, o, g, r, a, m) { | ||
71 | - i[ 'GoogleAnalyticsObject' ] = r; | ||
72 | - i[ r ] = i[ r ] || function() { | ||
73 | - (i[ r ].q = i[ r ].q || []).push(arguments) | ||
74 | - }, i[ r ].l = 1 * new Date(); | ||
75 | - a = s.createElement(o), m = s.getElementsByTagName(o)[ 0 ]; | ||
76 | - a.async = 1; | ||
77 | - a.src = g; | ||
78 | - m.parentNode.insertBefore(a, m) | ||
79 | - })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); | 68 | + <!-- Global Site Tag (gtag.js) - Google Analytics --> |
69 | + <script async src="https://www.googletagmanager.com/gtag/js?id=UA-106355704-1"></script> | ||
70 | + <script> | ||
71 | + window.dataLayer = window.dataLayer || []; | ||
72 | + function gtag(){dataLayer.push(arguments);} | ||
73 | + gtag('js', new Date()); | ||
80 | 74 | ||
81 | - ga('create', <?=$settings->ga_code?>, 'auto'); | ||
82 | - ga('send', 'pageview'); | ||
83 | - | ||
84 | - </script> | 75 | + gtag('config', 'UA-106355704-1'); |
76 | + </script> | ||
85 | <div id="all"> | 77 | <div id="all"> |
86 | <header> | 78 | <header> |
87 | <!-- *** TOP *** | 79 | <!-- *** TOP *** |