This commit is contained in:
Daniil Krymov 2025-03-19 08:38:22 +03:00 committed by GitHub
commit e612b28ea2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View file

@ -151,6 +151,7 @@
{{- /* Misc */}} {{- /* Misc */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }} {{- if hugo.IsProduction | or (eq site.Params.env "production") }}
{{- template "_internal/google_analytics.html" . }} {{- template "_internal/google_analytics.html" . }}
{{- template "partials/templates/yandex_metrika.html" . }}
{{- template "partials/templates/opengraph.html" . }} {{- template "partials/templates/opengraph.html" . }}
{{- template "partials/templates/twitter_cards.html" . }} {{- template "partials/templates/twitter_cards.html" . }}
{{- template "partials/templates/schema_json.html" . }} {{- template "partials/templates/schema_json.html" . }}

View file

@ -0,0 +1,16 @@
{{- if site.Params.yandexMetrika }}<!-- Yandex.Metrika counter -->
<script>
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym({{ site.Params.yandexMetrika }}, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/{{ site.Params.yandexMetrika }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->{{- end -}}