This repository has been archived by the owner on Jun 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Falaleev Maxim
committed
Jan 31, 2018
1 parent
56c9bd7
commit 5a112dc
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ | |
</div> | ||
</div> | ||
</div> | ||
|
||
{{ partial "analytics.html" . }} | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{{ partial "analytics_yandex.html" . }} | ||
{{ partial "analytics_google.html" . }} |
9 changes: 9 additions & 0 deletions
9
themes/hugo-simple-doc/layouts/partials/analytics_google.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.analytics_google }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', '{{ .Site.Params.analytics_google }}'); | ||
</script> |
31 changes: 31 additions & 0 deletions
31
themes/hugo-simple-doc/layouts/partials/analytics_yandex.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script type="text/javascript" > | ||
(function (d, w, c) { | ||
(w[c] = w[c] || []).push(function() { | ||
try { | ||
w[{{ printf "yaCounter%s" .Site.Params.analytics_yandex }}] = new Ya.Metrika2({ | ||
id:{{- .Site.Params.analytics_yandex -}}, | ||
clickmap:true, | ||
trackLinks:true, | ||
accurateTrackBounce:true, | ||
webvisor:true | ||
}); | ||
} catch(e) { } | ||
}); | ||
|
||
var n = d.getElementsByTagName("script")[0], | ||
s = d.createElement("script"), | ||
f = function () { n.parentNode.insertBefore(s, n); }; | ||
s.type = "text/javascript"; | ||
s.async = true; | ||
s.src = "https://mc.yandex.ru/metrika/tag.js"; | ||
|
||
if (w.opera == "[object Opera]") { | ||
d.addEventListener("DOMContentLoaded", f, false); | ||
} else { f(); } | ||
})(document, window, "yandex_metrika_callbacks2"); | ||
</script> | ||
<noscript> | ||
<div> | ||
<img src="https://mc.yandex.ru/watch/{{ .Site.Params.analytics_yandex }}" style="position:absolute; left:-9999px;" alt="" /> | ||
</div> | ||
</noscript> |