mirror of https://github.com/istio/istio.io.git
Use correct analytics id for normal/archive/preliminary versions of the site.
(cherry picked from commit 695b74e565
)
This commit is contained in:
parent
922aa25c4e
commit
4d00a0385f
|
@ -4,7 +4,6 @@ metaDataFormat = "yaml"
|
|||
title = "Istio"
|
||||
uglyURLs = false
|
||||
enableRobotsTXT = true
|
||||
googleAnalytics = "UA-98480406-1"
|
||||
pluralizeListTitles = false
|
||||
canonifyURLs = true
|
||||
disableKinds = ["taxonomy", "taxonomyTerm"]
|
||||
|
|
|
@ -47,18 +47,21 @@
|
|||
<meta name="twitter:creator" content="@{{ .Page.Params.twitter }}">
|
||||
{{ end }}
|
||||
|
||||
{{ $analytics_id := "UA-98480406-1" }}
|
||||
{{ if .Site.Data.args.archive }}
|
||||
{{ if eq .Title "Istio" }}
|
||||
<title>Istioldie {{ .Site.Data.args.version }}</title>
|
||||
{{ else }}
|
||||
<title>Istioldie {{ .Site.Data.args.version }} / {{ .Title }}</title>
|
||||
{{ end }}
|
||||
{{ $analytics_id = "UA-98480406-2" }}
|
||||
{{ else if .Site.Data.args.preliminary }}
|
||||
{{ if eq .Title "Istio" }}
|
||||
<title>Istio Prelim {{ .Site.Data.args.version }}</title>
|
||||
{{ else }}
|
||||
<title>Istio Prelim {{ .Site.Data.args.version }} / {{ .Title }}</title>
|
||||
{{ end }}
|
||||
{{ $analytics_id = "UA-98480406-3" }}
|
||||
{{ else }}
|
||||
{{ if eq .Title "Istio" }}
|
||||
<title>Istio</title>
|
||||
|
@ -68,12 +71,13 @@
|
|||
{{ end }}
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ $analytics_id }}"></script>
|
||||
<script>
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-98480406-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ $analytics_id }}');
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<!-- End Google Analytics -->
|
||||
|
||||
<script>
|
||||
|
|
Loading…
Reference in New Issue