Skip to content

Commit 41e04f2

Browse files
committed
stats: add matomo tracking code
1 parent bbb683d commit 41e04f2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

website/.vuepress/config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ module.exports = {
1212
title: "gbdev.io",
1313
description: "game boy development scene",
1414
head: [
15+
['script', {}, `
16+
var _paq = window._paq = window._paq || [];
17+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
18+
_paq.push(['trackPageView']);
19+
_paq.push(['enableLinkTracking']);
20+
(function() {
21+
var u="//stats.gbdev.io/";
22+
_paq.push(['setTrackerUrl', u+'matomo.php']);
23+
_paq.push(['setSiteId', '1']);
24+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
25+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
26+
})();
27+
`],
1528
[
1629
"link",
1730
{

0 commit comments

Comments
 (0)