mirror of
https://github.com/yuzu-emu/shared-bulma-theme.git
synced 2024-12-22 23:45:38 +00:00
Updated Analytics / Adsense code.
This commit is contained in:
parent
be8ed2132a
commit
71a6e8a5b4
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Params.languageCode | default " en-us " }}"
|
||||
{{- if not .IsHome }}class="has-navbar-fixed-top"{{- end }}>
|
||||
<html lang="{{ .Site.Params.languageCode | default " en-us " }}" {{- if not .IsHome }}class="has-navbar-fixed-top" {{- end }}>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -26,11 +25,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
{{- if not .IsHome }}
|
||||
{{ partial "layout/navbar" . }}
|
||||
{{- end }}
|
||||
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{- if not .IsHome }} {{ partial "layout/navbar" . }} {{- end }} {{ block "main" . }}{{ end }}
|
||||
|
||||
<div class="container">
|
||||
<footer class="footer">
|
||||
|
@ -39,23 +34,24 @@
|
|||
</div>
|
||||
|
||||
<script src="{{ .Site.BaseURL }}/js/script.js"></script>
|
||||
|
||||
{{ if eq (getenv "HUGO_ENV") "PRD" }}
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.GoogleAnalyticsTrackingId }} }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ .Site.Params.GoogleAnalyticsTrackingId }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
<script type="text/javascript">
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ .Site.Params.GoogleAnalyticsTrackingId }}');
|
||||
</script>
|
||||
<!-- End Google Analytics -->
|
||||
{{- end }}
|
||||
|
||||
{{- block "scripts" . }}{{- end }}
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue