Skip to content

Commit 1d13ea1

Browse files
committed
moved to google analytics 4
1 parent 1de558f commit 1d13ea1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ twitter_username: omnetpp
66
github_username: omnetpp
77
excerpt_separator: <!--more-->
88
google_analytics: UA-240922-2
9+
google_analytics4: G-QGGDS2R96M
910

1011
sass:
1112
style: compressed

_includes/google-analytics.html

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
ga('create', '{{ site.google_analytics }}', 'auto');
88
ga('send', 'pageview');
9+
<!-- Global site tag (gtag.js) - Google Analytics -->
10+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-QGGDS2R96M"></script>
11+
<script>
12+
window.dataLayer = window.dataLayer || [];
13+
function gtag(){dataLayer.push(arguments);}
14+
gtag('js', new Date());
915

16+
gtag('config', '{{ site.google_analytics4 }}');
17+
</script>
1018
</script>
1119

0 commit comments

Comments
 (0)