Skip to content

Commit

Permalink
Add Matomo Tracking code (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
agarrone authored Apr 8, 2024
1 parent 34c4cb1 commit 6277ecd
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions site/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,31 @@ module.exports = {
*
* ref:https://v1.vuepress.vuejs.org/config/#head
*/
head: [
head: [
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
[
"meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" },
],
["meta", { name: "apple-mobile-web-app-status-bar-style", content: "black" }],
["link", { rel: "icon", href: "/assets/favicons/favicon.ico" }],
// Code pour le suivi Matomo
[
"script",
{},
`
var _paq = window._paq = window._paq || [];
_paq.push(["setExcludedQueryParams", ["simulationId","_csrf"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://stats.data.gouv.fr/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '90']);
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);
})();
`
]
],


/**
* Theme configuration, here is the default theme configuration for VuePress.
*
Expand Down

0 comments on commit 6277ecd

Please sign in to comment.