Commit 30430d237495ea0cb0b6318d8a41afb7ae70ccc2
1 parent
027bb623
Implement google analytics for master branch
Showing
3 changed files
with
20 additions
and
0 deletions
doc/source/_themes/sphinx13/ga.html
0 → 100644
| 1 | +<script> | ||
| 2 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
| 3 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
| 4 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
| 5 | + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
| 6 | + | ||
| 7 | + ga('create', 'UA-27448879-1', 'auto'); | ||
| 8 | + ga('send', 'pageview'); | ||
| 9 | + | ||
| 10 | +</script> |
doc/source/_themes/sphinx13/gtm.html
0 → 100644
| 1 | +<!-- Google Tag Manager --> | ||
| 2 | +<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5JKNCP" | ||
| 3 | +height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
| 4 | +<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
| 5 | +new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
| 6 | +j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | ||
| 7 | +'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
| 8 | +})(window,document,'script','dataLayer','GTM-5JKNCP');</script> | ||
| 9 | +<!-- End Google Tag Manager --> |
doc/source/_themes/sphinx13/layout.html
| @@ -65,6 +65,7 @@ | @@ -65,6 +65,7 @@ | ||
| 65 | {% endblock %} | 65 | {% endblock %} |
| 66 | 66 | ||
| 67 | {% block header %} | 67 | {% block header %} |
| 68 | +{% include "gtm.html" %} | ||
| 68 | <div class="pageheader"> | 69 | <div class="pageheader"> |
| 69 | <ul> | 70 | <ul> |
| 70 | <li><a href="{{ pathto('about') }}">About</a></li> | 71 | <li><a href="{{ pathto('about') }}">About</a></li> |