Added privacy-friendly analytics with matomo
This commit is contained in:
parent
b9015e5d31
commit
376287c2a2
51
layouts/_default/baseof.html
Normal file
51
layouts/_default/baseof.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
|
||||
<head>
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} // {{ .Site.Title }}{{ end }}</title>
|
||||
<meta charset="utf-8" />
|
||||
{{ hugo.Generator }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="author" content="{{ .Site.Params.author | default "John Doe" }}" />
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
|
||||
{{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" />
|
||||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
||||
<!-- Matomo -->
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//matomo.phundrak.com/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '3']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header class="app-header">
|
||||
<a href="{{ .Site.BaseURL }}"><img class="app-header-avatar" src="{{ .Site.Params.avatar | default "avatar.jpg" | relURL }}" alt="{{ .Site.Params.author | default "John Doe" }}" /></a>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
<p>{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}</p>
|
||||
<div class="app-header-social">
|
||||
{{ range .Site.Params.social }}
|
||||
<a target="_blank" href="{{ .url }}" rel="noreferrer noopener">{{ partial "icon.html" (dict "ctx" $ "name" .name ) }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
<main class="app-container">
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user