Skip to content

Commit

Permalink
Migrate google analytics (#2654)
Browse files Browse the repository at this point in the history
This switches from the existing Universal Analytics to Google Analytics 4 as the
former will be deprecated at the end of the month.
  • Loading branch information
zachgk authored Jun 15, 2023
1 parent 28562ca commit 3bcc6dc
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 34 deletions.
7 changes: 4 additions & 3 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ theme:
primary: light-blue
accent: light-blue
edit_uri: ''
google_analytics:
- UA-159559852-2
- auto

extra:
social:
- icon: fontawesome/brands/github-alt
Expand All @@ -31,6 +29,9 @@ extra:
link: https://join.slack.com/t/deepjavalibrary/shared_invite/zt-ar91gjkz-qbXhr1l~LFGEIEeGBibT7w
- icon: fontawesome/brands/zhihu
link: https://zhuanlan.zhihu.com/c_1255493231133417472
analytics:
provider: google
property: G-JE0V807433
docs_dir: '../'
plugins:
- search
Expand Down
14 changes: 6 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@

<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-159559852-2"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JE0V807433"></script>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-159559852-2');
gtag('config', 'G-JE0V807433');
</script>
<!-- Google Tag Manager -->
<script>
Expand Down Expand Up @@ -263,4 +261,4 @@ <h5 class="grey-text text-lighten-4 an-1 ">

</body>

</html>
</html>
12 changes: 5 additions & 7 deletions index1.0.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-159559852-2"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JE0V807433"></script>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-159559852-2');
gtag('config', 'G-JE0V807433');
</script>
<!-- Google Tag Manager -->
<script>
Expand Down
11 changes: 6 additions & 5 deletions website/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

<html lang="en" class="gr__materializecss_com"><head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-159559852-2"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JE0V807433"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-159559852-2');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-JE0V807433');
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand Down
11 changes: 5 additions & 6 deletions website/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<html lang="en" class="gr__materializecss_com">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-159559852-2"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JE0V807433"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-159559852-2');

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-JE0V807433');
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand Down
11 changes: 6 additions & 5 deletions website/javadoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

<html lang="en" class="gr__materializecss_com"><head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-159559852-2"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JE0V807433"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-159559852-2');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-JE0V807433');
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand Down

0 comments on commit 3bcc6dc

Please sign in to comment.