File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ params:
54
54
github_repo : https://github.com/open-telemetry/opentelemetry.io
55
55
github_branch : main
56
56
gcs_engine_id : bde3d634eca9cd335
57
+ googleAnalytics : " G-QZHM7YEG07, UA-154693307-1"
57
58
58
59
ui :
59
60
footer_about_disable : true
Original file line number Diff line number Diff line change 1
1
{{/* Global site tag (gtag.js) - Google Analytics */ -}}
2
2
3
- {{ $ua_id := "UA-154693307-1" -}}
4
- {{ $ga4_id := "G-QZHM7YEG07" -}}
5
- {{ $ga_id := $ga4_id -}}
3
+ {{ with .Site.Params.GoogleAnalytics -}}
6
4
7
- < script async src ="https://www.googletagmanager.com/gtag/js?id={{ $ga_id }} "> </ script >
5
+ {{ $ga_ids := split . ", " -}}
6
+
7
+ < script async src ="https://www.googletagmanager.com/gtag/js?id={{ index $ga_ids 0 }} "> </ script >
8
8
< script >
9
9
window . dataLayer = window . dataLayer || [ ] ;
10
10
function gtag ( ) { dataLayer . push ( arguments ) ; }
11
11
gtag ( 'js' , new Date ( ) ) ;
12
-
13
- gtag ( 'config' , '{{ $ga_id }}' ) ;
14
- gtag ( 'config' , '{{ $ua_id }}' ) ;
12
+ { { range $ga_ids } }
13
+ gtag ( 'config' , '{{ . }}' ) ;
14
+ { { - end } }
15
15
</ script >
16
- {{- /**/ -}}
16
+ {{- end -}}
You can’t perform that action at this time.
0 commit comments