File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,13 @@ var index = `<!DOCTYPE html><html>
1717 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
1818
1919 {{if .Configuration.GoogleAnalytics}}
20- <script type="text/javascript">
21- var _gaq = _gaq || [];
22- _gaq.push(['_setAccount', '{{.Configuration.GoogleAnalytics}}']);
23- _gaq.push(['_trackPageview']);
20+ <script async src="https://www.googletagmanager.com/gtag/js?id={{.Configuration.GoogleAnalytics}}"></script>
21+ <script>
22+ window.dataLayer = window.dataLayer || [];
23+ function gtag(){dataLayer.push(arguments);}
24+ gtag('js', new Date());
2425
25- (function() {
26- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
27- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
28- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
29- })();
26+ gtag('config', '{{.Configuration.GoogleAnalytics}}');
3027 </script>
3128 {{end}}
3229</head>
You can’t perform that action at this time.
0 commit comments