File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,32 @@ const config: Config = {
20
20
onBrokenLinks : "throw" ,
21
21
onBrokenMarkdownLinks : "warn" ,
22
22
23
+ // Google Analytics
24
+ scripts : [
25
+ {
26
+ src : 'https://www.googletagmanager.com/gtag/js?id=G-W02Z2VJYCR' ,
27
+ async : true ,
28
+ } ,
29
+ {
30
+ content : `
31
+ window.dataLayer = window.dataLayer || [];
32
+ function gtag(){dataLayer.push(arguments);}
33
+ gtag('js', new Date());
34
+ gtag('config', 'G-W02Z2VJYCR', {
35
+ debug_mode: ${ process . env . NODE_ENV !== 'production' ? 'true' : 'false' }
36
+ });
37
+ ` ,
38
+ } ,
39
+ ] ,
40
+
23
41
i18n : {
24
42
defaultLocale : "en" ,
25
43
locales : [ "en" ] ,
26
44
} ,
27
45
28
46
presets : [
29
47
[
30
- " classic" ,
48
+ ' classic' ,
31
49
{
32
50
docs : {
33
51
sidebarPath : require . resolve ( "./sidebars.ts" ) ,
Original file line number Diff line number Diff line change 17
17
"dependencies" : {
18
18
"@docusaurus/core" : " 3.7.0" ,
19
19
"@docusaurus/plugin-content-docs" : " 3.7.0" ,
20
+ "@docusaurus/plugin-google-analytics" : " ^3.8.1" ,
20
21
"@docusaurus/plugin-ideal-image" : " 3.7.0" ,
21
22
"@docusaurus/preset-classic" : " 3.7.0" ,
22
23
"@docusaurus/theme-mermaid" : " 3.7.0" ,
You can’t perform that action at this time.
0 commit comments