Commit f7011928c11d2005546028ef558f4da29335a304
1 parent
86d3a6cf
-GA code
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
frontend/views/layouts/main.php
| @@ -65,6 +65,23 @@ | @@ -65,6 +65,23 @@ | ||
| 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'); | ||
| 80 | + | ||
| 81 | + ga('create', <?=$settings->ga_code?>, 'auto'); | ||
| 82 | + ga('send', 'pageview'); | ||
| 83 | + | ||
| 84 | + </script> | ||
| 68 | <div id="all"> | 85 | <div id="all"> |
| 69 | <header> | 86 | <header> |
| 70 | <!-- *** TOP *** | 87 | <!-- *** TOP *** |