Skip to content
This repository was archived by the owner on Nov 16, 2024. It is now read-only.

Commit b68617f

Browse files
committed
add: google analytics tag
1 parent 1de9ee9 commit b68617f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Theppitak M.</title>
88
</head>
9+
10+
<!-- Google tag (gtag.js) -->
11+
<script
12+
async
13+
src="https://www.googletagmanager.com/gtag/js?id=G-%VITE_APP_GOOGLE_ANALYTICS%"
14+
></script>
15+
<script>
16+
window.dataLayer = window.dataLayer || [];
17+
function gtag() {
18+
dataLayer.push(arguments);
19+
}
20+
gtag("js", new Date());
21+
22+
gtag("config", "%VITE_APP_GOOGLE_ANALYTICS%");
23+
</script>
24+
925
<body>
1026
<div id="root"></div>
1127
<script type="module" src="/src/main.jsx"></script>

0 commit comments

Comments
 (0)