Skip to content

Commit 27484df

Browse files
analytics added
Signed-off-by: vignesh-cloud-prog <[email protected]>
1 parent e370138 commit 27484df

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pages/_app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ import en from "javascript-time-ago/locale/en";
2020
TimeAgo.addDefaultLocale(en);
2121

2222
function MyApp({ Component, pageProps }) {
23+
useEffect(() => {
24+
25+
window.dataLayer = window.dataLayer || [];
26+
function gtag(){dataLayer.push(arguments);}
27+
gtag('js', new Date());
28+
29+
gtag('config', 'G-HX2WW6VX6T');
30+
31+
});
2332
return (
2433
<>
2534
<MessageContextProvider>
@@ -40,6 +49,9 @@ function MyApp({ Component, pageProps }) {
4049
name="keywords"
4150
content="kannada, kaalashiva, blog, story, article"
4251
/>
52+
{/* <!-- Global site tag (gtag.js) - Google Analytics --> */}
53+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HX2WW6VX6T"></script>
54+
4355
</Head>
4456
<Navbar />
4557
<Component {...pageProps} />

0 commit comments

Comments
 (0)