feat: integrate Umami analytics with cv-view, theme-change, pdf-download and infra-visit tracking
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
19c461de40
commit
5b8724819a
1 changed files with 8 additions and 1 deletions
|
|
@ -26,6 +26,8 @@
|
||||||
<meta name="twitter:creator" id="tw-creator" content="">
|
<meta name="twitter:creator" id="tw-creator" content="">
|
||||||
<!-- Schema.org JSON-LD injecté dynamiquement -->
|
<!-- Schema.org JSON-LD injecté dynamiquement -->
|
||||||
<script type="application/ld+json" id="schema-jsonld"></script>
|
<script type="application/ld+json" id="schema-jsonld"></script>
|
||||||
|
<!-- Analytics Umami -->
|
||||||
|
<script defer src="https://analytics.stephaneliabeuf.fr/script.js" data-website-id="e2570832-3cf4-4645-8d02-2e9676f123be"></script>
|
||||||
<!-- Print CSS -->
|
<!-- Print CSS -->
|
||||||
<style>
|
<style>
|
||||||
@media print {
|
@media print {
|
||||||
|
|
@ -3178,7 +3180,7 @@
|
||||||
${esc(id.nom)}<span class="hero-name-line2">${esc(id.prenom)}</span>
|
${esc(id.nom)}<span class="hero-name-line2">${esc(id.prenom)}</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="hero-subtitle">${esc(id.accroche)}</p>
|
<p class="hero-subtitle">${esc(id.accroche)}</p>
|
||||||
<div style="margin-top:20px;display:inline-block"><a id="infraBtn" href="infrastructure.html" class="infra-btn">⚡ Voir mon infrastructure</a></div>
|
<div style="margin-top:20px;display:inline-block"><a id="infraBtn" href="infrastructure.html" class="infra-btn" data-umami-event="infra-visit">⚡ Voir mon infrastructure</a></div>
|
||||||
<div class="hero-stats">
|
<div class="hero-stats">
|
||||||
${d.stats.map(s => `
|
${d.stats.map(s => `
|
||||||
<div class="stat-box">
|
<div class="stat-box">
|
||||||
|
|
@ -3330,6 +3332,7 @@
|
||||||
});
|
});
|
||||||
}, 200);
|
}, 200);
|
||||||
localStorage.setItem('cv-theme', theme);
|
localStorage.setItem('cv-theme', theme);
|
||||||
|
if (typeof umami !== 'undefined') umami.track('theme-change', { theme });
|
||||||
}
|
}
|
||||||
|
|
||||||
// ══════════════════════════════════════════════
|
// ══════════════════════════════════════════════
|
||||||
|
|
@ -3362,6 +3365,9 @@
|
||||||
// Lang dynamique depuis le JSON (défaut : fr)
|
// Lang dynamique depuis le JSON (défaut : fr)
|
||||||
document.documentElement.lang = data.identity.lang || 'fr';
|
document.documentElement.lang = data.identity.lang || 'fr';
|
||||||
|
|
||||||
|
// Tracking version CV
|
||||||
|
if (typeof umami !== 'undefined') umami.track('cv-view', { version: cvParam || 'master' });
|
||||||
|
|
||||||
// Restaurer le thème sauvegardé
|
// Restaurer le thème sauvegardé
|
||||||
const saved = localStorage.getItem('cv-theme');
|
const saved = localStorage.getItem('cv-theme');
|
||||||
if (saved && ['cyberpunk','bd','itpro','cgi'].includes(saved)) setTheme(saved);
|
if (saved && ['cyberpunk','bd','itpro','cgi'].includes(saved)) setTheme(saved);
|
||||||
|
|
@ -3444,6 +3450,7 @@
|
||||||
// TÉLÉCHARGEMENT PDF
|
// TÉLÉCHARGEMENT PDF
|
||||||
// ══════════════════════════════════════════════
|
// ══════════════════════════════════════════════
|
||||||
function downloadCV() {
|
function downloadCV() {
|
||||||
|
if (typeof umami !== 'undefined') umami.track('pdf-download', { version: cvParam || 'master' });
|
||||||
window.print();
|
window.print();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue