enable googleanalytics only on production
Prithu Goswami prithugoswami524@gmail.com
Sun, 10 May 2020 07:32:04 +0530
2 files changed,
8 insertions(+),
7 deletions(-)
M
hugo-site/layouts/index.html
→
hugo-site/layouts/index.html
@@ -1,4 +1,4 @@
-{{ partial "head.html" }} +{{ partial "head.html" . }} <body>@@ -148,4 +148,3 @@ </section>
</body> </html> -
M
hugo-site/layouts/partials/head.html
→
hugo-site/layouts/partials/head.html
@@ -7,6 +7,12 @@ <title>Prithu Goswami</title>
<meta name="description" content="Prithu Goswami's personal website"> <meta name="author" content="Prithu Goswami"> <meta name="viewport" content="width=device-width, initial-scale=1"> + <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:300,400,700" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Noto+Serif:400" rel="stylesheet"> + <link rel="stylesheet" href="/css/main.css"> + <link rel="stylesheet" href="/css/blog.css"> + <link rel="icon" type="img/png" href="/img/favicon.png"> + {{ if hugo.IsProduction }} <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165619342-1"></script> <script> window.dataLayer = window.dataLayer || [];@@ -15,10 +21,6 @@ gtag('js', new Date());
gtag('config', 'UA-165619342-1'); </script> - <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:300,400,700" rel="stylesheet"> - <link href="https://fonts.googleapis.com/css?family=Noto+Serif:400" rel="stylesheet"> - <link rel="stylesheet" href="/css/main.css"> - <link rel="stylesheet" href="/css/blog.css"> - <link rel="icon" type="img/png" href="/img/favicon.png"> + {{ end }} </head>