Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* AegisOne Engineering — <noscript> счётчиков аналитики
|
||||
*
|
||||
* Должен подключаться сразу после <body>.
|
||||
* Содержит только <noscript> — валидный HTML только в <body>.
|
||||
*
|
||||
* Подключать: <?php if (file_exists(__DIR__ . '/analytics-body.php')) require __DIR__ . '/analytics-body.php'; ?>
|
||||
*/
|
||||
|
||||
$ymId = defined('YANDEX_METRIKA_ID') ? YANDEX_METRIKA_ID : '';
|
||||
$gaId = defined('GOOGLE_ANALYTICS_ID') ? GOOGLE_ANALYTICS_ID : '';
|
||||
?>
|
||||
|
||||
<?php if ($ymId !== ''): ?>
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/<?= $ymId ?>" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($gaId !== ''): ?>
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?= $gaId ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user