Added Yandex Metrika analytics support (#768)
### Prerequisites
Put an `x` into the box(es) that apply:
- [ ] This pull request fixes a bug.
- [x] This pull request adds a feature.
- [ ] This pull request introduces breaking change.
### Description
Added Yandex Metrika analytics support (https://metrika.yandex.ru)
2 files modified
1 files added
| | |
| | | # [params.googleTagManager] |
| | | # id = "gid" |
| | | |
| | | # If you want to use Yandex Metrika(https://metrika.yandex.ru) for analytics, add this section |
| | | # [params.yandexMetrika] |
| | | # id = "gid" |
| | | |
| | | # If you want to use Application Insights(https://azure.com/) for analytics, add this section |
| | | # [params.applicationInsights] |
| | | # connectionString = "connectionString" |
| | |
| | | {{- partial "analytics/microanalyticsio" . -}} |
| | | {{ end }} |
| | | |
| | | {{ if and .Site.Params.yandexMetrika .Site.Params.yandexMetrika.id }} |
| | | {{- partial "analytics/yandex-metrika" . -}} |
| | | {{ end }} |
| | | |
| | | {{- partial "body/extensions" . -}} |
| | | </body> |
| | | |
| New file |
| | |
| | | <!-- 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();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.id }}, "init", { |
| | | clickmap:true, |
| | | trackLinks:true, |
| | | accurateTrackBounce:true |
| | | }); |
| | | </script> |
| | | <noscript><div><img src="https://mc.yandex.ru/watch/{{ $.Site.Params.yandexMetrika.id }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript> |
| | | <!-- /Yandex.Metrika counter --> |