Показ метрики можно отключать в конфиге
This commit is contained in:
parent
4afeabf498
commit
c21d27aa1e
|
|
@ -9,5 +9,6 @@ return array(
|
||||||
'dbname' => 'poi',
|
'dbname' => 'poi',
|
||||||
),
|
),
|
||||||
//'version' => trim(file_get_contents(dirname(__FILE__).'/version')),
|
//'version' => trim(file_get_contents(dirname(__FILE__).'/version')),
|
||||||
|
'metrika' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
|
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
|
||||||
<?= self::renderPartial('modals/about.php', array(), true) ?>
|
<?= self::renderPartial('modals/about.php', array(), true) ?>
|
||||||
<?= self::renderPartial('modals/howToUse.php', array(), true) ?>
|
<?= self::renderPartial('modals/howToUse.php', array(), true) ?>
|
||||||
|
<?php if (App::getConfig('metrika')): ?>
|
||||||
<!-- Yandex.Metrika counter -->
|
<!-- Yandex.Metrika counter -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(d, w, c) {
|
(function(d, w, c) {
|
||||||
|
|
@ -52,22 +53,28 @@
|
||||||
try {
|
try {
|
||||||
w.yaCounter24682772 = new Ya.Metrika({id: 24682772,
|
w.yaCounter24682772 = new Ya.Metrika({id: 24682772,
|
||||||
trackLinks: true});
|
trackLinks: true});
|
||||||
} catch(e) { }
|
} catch (e) {
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var n = d.getElementsByTagName("script")[0],
|
var n = d.getElementsByTagName("script")[0],
|
||||||
s = d.createElement("script"),
|
s = d.createElement("script"),
|
||||||
f = function () { n.parentNode.insertBefore(s, n); };
|
f = function() {
|
||||||
|
n.parentNode.insertBefore(s, n);
|
||||||
|
};
|
||||||
s.type = "text/javascript";
|
s.type = "text/javascript";
|
||||||
s.async = true;
|
s.async = true;
|
||||||
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
|
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
|
||||||
|
|
||||||
if (w.opera == "[object Opera]") {
|
if (w.opera == "[object Opera]") {
|
||||||
d.addEventListener("DOMContentLoaded", f, false);
|
d.addEventListener("DOMContentLoaded", f, false);
|
||||||
} else { f(); }
|
} else {
|
||||||
|
f();
|
||||||
|
}
|
||||||
})(document, window, "yandex_metrika_callbacks");
|
})(document, window, "yandex_metrika_callbacks");
|
||||||
</script>
|
</script>
|
||||||
<noscript><div><img src="//mc.yandex.ru/watch/24682772" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
<noscript><div><img src="//mc.yandex.ru/watch/24682772" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||||
<!-- /Yandex.Metrika counter -->
|
<!-- /Yandex.Metrika counter -->
|
||||||
|
<?php endif; ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue