fbd4e92e9f
Full rewrite: swap out the v1 framework (src/, controllers/, views/, twig/, sass/, skeleton/) for the working v2 codebase from phpproject (App/, novaconium/, public/).
18 lines
781 B
Twig
18 lines
781 B
Twig
{% if matomo_url and matomo_site_id %}
|
|
<script>
|
|
var _paq = window._paq = window._paq || [];
|
|
{% if is_404 %}
|
|
_paq.push(['setDocumentTitle', '404/URL = ' + encodeURIComponent(document.location.pathname + document.location.search) + '/From = ' + encodeURIComponent(document.referrer)]);
|
|
{% endif %}
|
|
_paq.push(['trackPageView']);
|
|
_paq.push(['enableLinkTracking']);
|
|
(function() {
|
|
var u = "{{ matomo_url|e('js') }}";
|
|
_paq.push(['setTrackerUrl', u + 'matomo.php']);
|
|
_paq.push(['setSiteId', '{{ matomo_site_id|e('js') }}']);
|
|
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>
|
|
{% endif %}
|