Skip to content

Commit 339cd8a

Browse files
committed
Add analitics again
1 parent 4082c83 commit 339cd8a

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

website/docusaurus.config.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ module.exports = {
1515
projectName: 'scala-cli',
1616
plugins: ['docusaurus-plugin-sass'],
1717
themeConfig: {
18-
gtag: {
19-
// You can also use your "G-" Measurement ID here.
20-
trackingID: 'GTM-5TZTCGF',
21-
anonymizeIP: true,
22-
},
23-
googleAnalytics: {
24-
trackingID: 'GTM-5TZTCGF',
25-
},
2618
prism: {
2719
theme: lightCodeTheme,
2820
darkTheme: darkCodeTheme,

website/src/theme/Root.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import React from 'react';
2+
import Head from '@docusaurus/Head';
3+
4+
5+
// Default implementation, that you can customize
6+
function Root({children}) {
7+
return <>
8+
<Head>
9+
<script>
10+
{`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
11+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
12+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
13+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
14+
})(window,document,'script','dataLayer','GTM-5TZTCGF');`}
15+
</script>
16+
</Head>
17+
{children}
18+
<noscript>
19+
20+
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5TZTCGF"
21+
height="0" width="0" style="display:none;visibility:hidden"></iframe>
22+
</noscript>
23+
</>;
24+
}
25+
26+
export default Root;

0 commit comments

Comments
 (0)