Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Yandex.Metrika counter & turn on the Google Analytics #9

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into t

# Google Analytics Tracking (optional)
# Supports a CSV of tracking ID strings (eg. "UA-1234567-89,G-1AB234CDE5")
#ga_tracking: UA-2709176-10
#ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default)
ga_tracking: G-3712TB0863
ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default)

# Yandex.Metrika counter
yandex_metrika: "99021176"

# External navigation links
nav_external_links:
Expand Down
18 changes: 18 additions & 0 deletions _includes/components/mermaid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

{% if site.yandex_metrika %}
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(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.yandex_metrika }}, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/{{ site.yandex_metrika }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
{% endif %}