2022-01-19 12:18:00 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @var string $matomo_analytics_url
|
2024-05-11 20:02:15 +03:00
|
|
|
* @var string $matomo_analytics_site_id
|
2022-01-19 12:18:00 +03:00
|
|
|
*/
|
|
|
|
?>
|
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php if (!empty($matomo_analytics_url)): ?>
|
2022-05-26 15:51:46 +03:00
|
|
|
|
|
|
|
<script>
|
|
|
|
var _paq = window._paq = window._paq || [];
|
|
|
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
|
|
|
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
|
|
|
|
_paq.push(['trackPageView']);
|
|
|
|
_paq.push(['enableLinkTracking']);
|
|
|
|
(function () {
|
2023-03-13 10:18:39 +03:00
|
|
|
var u = "<?= e($matomo_analytics_url) ?>";
|
2022-05-26 15:51:46 +03:00
|
|
|
_paq.push(['setTrackerUrl', u + 'matomo.php']);
|
2024-05-11 20:02:15 +03:00
|
|
|
_paq.push(['setSiteId', '<?= e($matomo_analytics_site_id) ?>']);
|
2022-05-26 15:51:46 +03:00
|
|
|
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
|
|
|
|
g.async = true;
|
|
|
|
g.src = u + 'matomo.js';
|
|
|
|
s.parentNode.insertBefore(g, s);
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
|
2023-02-21 10:11:14 +03:00
|
|
|
<noscript>
|
2024-05-11 20:02:15 +03:00
|
|
|
<p><img src="<?= e($matomo_analytics_url) ?>matomo.php?idsite=<?= e(
|
|
|
|
$matomo_analytics_site_id,
|
|
|
|
) ?>&rec=1" style="border:0;" alt=""/></p>
|
2022-05-26 15:51:46 +03:00
|
|
|
</noscript>
|
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
<?php endif; ?>
|