|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <html lang="{{ site.lang | default: "en-US" }}">
|
3 | 3 | <head>
|
4 |
| - {% if site.google_analytics %} |
5 |
| - <!-- Global Site Tag (gtag.js) - Google Analytics --> |
6 |
| - <script async src="https://www.googletagmanager.com/gtag/js?id=UA-107694606-1"></script> |
7 |
| - <script> |
8 |
| - window.dataLayer = window.dataLayer || []; |
9 |
| - function gtag(){dataLayer.push(arguments);} |
10 |
| - gtag('js', new Date()); |
11 |
| - |
12 |
| - gtag('config', 'UA-107694606-1'); |
13 |
| - </script> |
14 |
| - {% endif %} <meta charset="UTF-8"> |
| 4 | + <meta charset="UTF-8"> |
15 | 5 |
|
16 | 6 | {% seo %}
|
17 | 7 | <meta name="description" content="{{ page.description | default: site.description | default: site.github.project_tagline }}"/>
|
@@ -45,6 +35,17 @@ <h2 class="project-tagline">{{ site.description | default: site.github.project_t
|
45 | 35 | </footer>
|
46 | 36 | </section>
|
47 | 37 |
|
| 38 | + {% if site.google_analytics %} |
| 39 | + <script type="text/javascript"> |
| 40 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 41 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 42 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 43 | + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| 44 | + |
| 45 | + ga('create', '{{ site.google_analytics }}', 'auto'); |
| 46 | + ga('send', 'pageview'); |
| 47 | + </script> |
48 | 48 |
|
| 49 | + {% endif %} |
49 | 50 | </body>
|
50 | 51 | </html>
|
0 commit comments