Skip to content

Commit 79cb2a2

Browse files
committed
Move to Google Analytics 4
1 parent 043e1aa commit 79cb2a2

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/main/resources/docinfo/noorm-documentation/index-docinfo-footer.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
<!-- Google Analytics -->
2-
<script type="text/javascript">
3-
dataLayer = [{'channel' : '${html.google-analytics.tag-manager.channel}', 'additional_tracking_code' : '${html.google-analytics.id}'}];
4-
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
5-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
6-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
7-
})(window,document,'script','dataLayer','${html.google-analytics.tag-manager.id}');
8-
</script>
9-
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=${html.google-analytics.tag-manager.id}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
10-
<!-- /Google Analytics -->
11-
121
<!-- HibernateDoc.OutdatedContent -->
132
<script src="//code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
143
<script src="/hibernate/_outdated-content/outdated-content.js" type="text/javascript"></script>

src/main/resources/docinfo/noorm-documentation/index-docinfo.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,15 @@
2626
#tocbot a.toc-link.node-name--H6{ display:none }
2727
}
2828
</style>
29-
<!-- /Dynamic TOC -->
29+
<!-- /Dynamic TOC -->
30+
31+
<!-- Google Analytics -->
32+
<script async src="https://www.googletagmanager.com/gtag/js?id=${html.google-analytics.id}"></script>
33+
<script>
34+
window.dataLayer = window.dataLayer || [];
35+
function gtag(){dataLayer.push(arguments);}
36+
gtag('js', new Date());
37+
38+
gtag('config', '${html.google-analytics.id}');
39+
</script>
40+
<!-- /Google Analytics -->

0 commit comments

Comments
 (0)