1
0
forked from ti-nuage/site

Ajout du code pour Matomo en mode production.

This commit is contained in:
David Soulayrol
2022-07-03 22:20:00 +02:00
parent a0620582c4
commit 0c500ce286
2 changed files with 17 additions and 0 deletions

View File

@@ -12,6 +12,22 @@
<!-- Generated with https://formito.com/tools/favicon -->
<link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
{% block head %}{% endblock %}
{% if production %}
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.ti-nuage.fr/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
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>
<!-- End Matomo -->
{% endif %}
</head>
<body>
<div class="Container">

View File

@@ -23,6 +23,7 @@ module.exports = new Metalsmith(config.paths.projectRoot)
.clean(__PROD__)
.metadata({
moment: moment,
production: __PROD__,
remove_diatrics: function (e) { return slug(e, { mode: 'rfc3986' }) },
site: {
title: 'Ti Nuage'