Skip to content

Commit 6cd3af3

Browse files
authored
Updated Google Analytics (#6589)
1 parent dbdb7c3 commit 6cd3af3

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

apps/ngx-bootstrap-docs/src/404.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,13 @@
3333
</bs-demo>
3434
<noscript>Please enable JavaScript to view ngx-bootstrap documentation</noscript>
3535
<!-- Google analytics-->
36+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8Z0HMZ2FH4"></script>
3637
<script>
37-
if (typeof window != 'undefined') {
38-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
39-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
40-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
41-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
38+
window.dataLayer = window.dataLayer || [];
39+
function gtag(){dataLayer.push(arguments);}
40+
gtag('js', new Date());
4241

43-
ga('create', 'UA-73071494-1', 'auto');
44-
ga('send', 'pageview');
45-
}
42+
gtag('config', 'G-8Z0HMZ2FH4');
4643
</script>
4744
<script async="" src="assets/js/prettify.min.js"></script>
4845
<!-- script files will be inserted by html-webpack-plugin -->

apps/ngx-bootstrap-docs/src/index.html

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<title>Angular Bootstrap</title>
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7-
<meta name="description" content="Bootstrap 5 and Bootstrap 4 widgets for Angular: accordion, alerts, buttons, carousel, collapse, datepicker, dropdowns, modals, pagination, popover, progressbar, rating, sortable, tabs, timepicker, tooltip, typeahead">
7+
<meta name="description"
8+
content="Bootstrap 5 and Bootstrap 4 widgets for Angular: accordion, alerts, buttons, carousel, collapse, datepicker, dropdowns, modals, pagination, popover, progressbar, rating, sortable, tabs, timepicker, tooltip, typeahead">
89
<meta name="viewport" content="width=device-width, initial-scale=1">
910

1011
<link rel="icon" type="image/png" sizes="32x32" href='assets/images/favicons/favicon-32x32.png'>
@@ -28,23 +29,20 @@
2829
<meta name="msapplication-starturl" content="/">
2930
</head>
3031
<body>
31-
<bs-demo>
32-
Loading...
33-
</bs-demo>
34-
<noscript>Please enable JavaScript to view ngx-bootstrap documentation</noscript>
35-
<!-- Google analytics-->
36-
<script>
37-
if (typeof window != 'undefined') {
38-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
39-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
40-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
41-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
32+
<bs-demo>
33+
Loading...
34+
</bs-demo>
35+
<noscript>Please enable JavaScript to view ngx-bootstrap documentation</noscript>
36+
<!-- Google analytics-->
37+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8Z0HMZ2FH4"></script>
38+
<script>
39+
window.dataLayer = window.dataLayer || [];
40+
function gtag(){dataLayer.push(arguments);}
41+
gtag('js', new Date());
4242

43-
ga('create', 'UA-73071494-1', 'auto');
44-
ga('send', 'pageview');
45-
}
46-
</script>
47-
<script async src='assets/js/prettify.min.js'></script>
48-
<!-- script files will be inserted by html-webpack-plugin -->
43+
gtag('config', 'G-8Z0HMZ2FH4');
44+
</script>
45+
<script async src='assets/js/prettify.min.js'></script>
46+
<!-- script files will be inserted by html-webpack-plugin -->
4947
</body>
5048
</html>

0 commit comments

Comments
 (0)