Skip to content

Commit 071a278

Browse files
maxaloneclaude
andcommitted
Matomo (siteId 2) anche sulle pagine di redirect (devops/whitepaper/changelog shim)
Seguito del commit precedente: le tre pagine-cartello (site/devops.html, site/whitepaper.html, site/changelog.html) restavano senza Matomo perché sono redirect a refresh 0. Su richiesta esplicita, tracciate anche loro — utile anche a misurare quanto traffico arriva ancora dai vecchi indirizzi linkati da consumatori esterni immutabili (docs/DEVOPS.md di imgauth, README di attest-mcp). buildChangelogShim() ora riceve cfg e usa lo stesso renderMatomo() del resto del sito. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 8c3074f commit 071a278

6 files changed

Lines changed: 50 additions & 4 deletions

File tree

core/generators/build-changelog.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ ${renderFooterColumns({ site: cfg })}
119119
// site/devops.html (P47 F1/F2). site/changelog.html restava un file reale
120120
// finché non aveva un clean URL; con F3.2 diventa un cartello verso
121121
// /changelog/ — nessuno stile, nessun footer, solo il redirect.
122-
function buildChangelogShim() {
122+
function buildChangelogShim(cfg) {
123123
return `<!doctype html>
124124
<html lang="it">
125125
<head>
@@ -139,6 +139,7 @@ function buildChangelogShim() {
139139
a { color: #5a3d10; }
140140
@media (prefers-color-scheme: dark) { body { color: #ece4d3; background: #17140f; } a { color: #d1a969; } }
141141
</style>
142+
${renderMatomo(cfg.matomo)}
142143
</head>
143144
<body>
144145
<p>Il changelog ha un nuovo indirizzo: <a href="/changelog/">/changelog/</a>.</p>
@@ -163,7 +164,7 @@ function main() {
163164
const changelogDir = join(ROOT, "site", "changelog");
164165
mkdirSync(changelogDir, { recursive: true });
165166
writeFileSync(join(changelogDir, "index.html"), buildChangelogPage(publicEntries, cfg));
166-
writeFileSync(join(ROOT, "site", "changelog.html"), buildChangelogShim());
167+
writeFileSync(join(ROOT, "site", "changelog.html"), buildChangelogShim(cfg));
167168
console.log(`site/changelog/index.html generato (${publicEntries.length} voci pubbliche); site/changelog.html è lo shim.`);
168169
}
169170

site/changelog.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@
1717
a { color: #5a3d10; }
1818
@media (prefers-color-scheme: dark) { body { color: #ece4d3; background: #17140f; } a { color: #d1a969; } }
1919
</style>
20+
<!-- Matomo -->
21+
<script>
22+
var _paq = window._paq = window._paq || [];
23+
_paq.push(['disableCookies']);
24+
_paq.push(['trackPageView']);
25+
_paq.push(['enableLinkTracking']);
26+
(function() {
27+
var u="https://sg-matomo.azurewebsites.net/";
28+
_paq.push(['setTrackerUrl', u+'matomo.php']);
29+
_paq.push(['setSiteId', '2']);
30+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
31+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
32+
})();
33+
</script>
34+
<!-- End Matomo -->
2035
</head>
2136
<body>
2237
<p>Il changelog ha un nuovo indirizzo: <a href="/changelog/">/changelog/</a>.</p>

site/devops.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919
a { color: #5a3d10; }
2020
@media (prefers-color-scheme: dark) { body { color: #ece4d3; background: #17140f; } a { color: #d1a969; } }
2121
</style>
22+
<!-- Matomo -->
23+
<script>
24+
var _paq = window._paq = window._paq || [];
25+
_paq.push(['disableCookies']);
26+
_paq.push(['trackPageView']);
27+
_paq.push(['enableLinkTracking']);
28+
(function() {
29+
var u="https://sg-matomo.azurewebsites.net/";
30+
_paq.push(['setTrackerUrl', u+'matomo.php']);
31+
_paq.push(['setSiteId', '2']);
32+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
33+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
34+
})();
35+
</script>
36+
<!-- End Matomo -->
2237
</head>
2338
<body>
2439
<p>La pagina DevOps e rilasci riguarda il sistema di attestazione delle

site/score.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@
6464
"note": "validate 30/30 + gate 12/20 — quota PR esclusa (maintainer singolo, ADR-GTF-011)"
6565
}
6666
],
67-
"computed_at": "2026-08-16T14:14:23.908Z"
67+
"computed_at": "2026-08-16T14:23:37.252Z"
6868
}

site/whitepaper.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919
a { color: #5a3d10; }
2020
@media (prefers-color-scheme: dark) { body { color: #ece4d3; background: #17140f; } a { color: #d1a969; } }
2121
</style>
22+
<!-- Matomo -->
23+
<script>
24+
var _paq = window._paq = window._paq || [];
25+
_paq.push(['disableCookies']);
26+
_paq.push(['trackPageView']);
27+
_paq.push(['enableLinkTracking']);
28+
(function() {
29+
var u="https://sg-matomo.azurewebsites.net/";
30+
_paq.push(['setTrackerUrl', u+'matomo.php']);
31+
_paq.push(['setSiteId', '2']);
32+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
33+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
34+
})();
35+
</script>
36+
<!-- End Matomo -->
2237
</head>
2338
<body>
2439
<p>Il whitepaper tecnico riguarda il sistema di attestazione delle opere

tenants/attestazione/site/score.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@
6464
"note": "validate 30/30 + gate 12/20 — quota PR esclusa (maintainer singolo, ADR-GTF-011)"
6565
}
6666
],
67-
"computed_at": "2026-08-16T14:14:23.908Z"
67+
"computed_at": "2026-08-16T14:23:37.252Z"
6868
}

0 commit comments

Comments
 (0)