Skip to content

Commit d9f671b

Browse files
committed
add : google analytics
1 parent 2351281 commit d9f671b

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

package-lock.json

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"dependencies": {
1313
"@astrojs/sitemap": "^3.2.1",
1414
"astro": "^5.6.0",
15+
"astro-google-analytics": "^1.0.3",
1516
"astro-robots-txt": "^1.0.0",
1617
"badge-maker": "^3.3.1",
1718
"sharp": "^0.33.5"

src/layouts/BaseLayout.astro

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
import MainHead from "../components/MainHead.astro";
33
import Nav from "../components/Nav.astro";
44
import Footer from "../components/Footer.astro";
5-
5+
import { GoogleAnalytics } from "astro-google-analytics";
66
interface Props {
77
title?: string | undefined;
88
description?: string | undefined;
99
}
1010
1111
const {
12-
title = "Vignesh S Naik - Software Developer from Kochi, India",
12+
title = "Vignesh S Naik - Software Developer from Kochi, India",
1313
description = "Welcome to the personal website of Vignesh S Naik, a software developer. Explore projects, skills, and get in touch.",
1414
} = Astro.props;
1515
---
1616

1717
<html lang="en">
1818
<head>
19+
<GoogleAnalytics id="G-7FD9ZS8SH9" />
1920
<MainHead title={title} description={description} />
2021
<meta
2122
name="google-site-verification"
@@ -82,8 +83,8 @@ const {
8283
min-height: 100%;
8384
isolation: isolate;
8485
background:
85-
/*noise*/ url("/assets/backgrounds/noise.png") top
86-
center/220px repeat,
86+
/*noise*/
87+
url("/assets/backgrounds/noise.png") top center/220px repeat,
8788
/*footer*/ var(--bg-image-footer) bottom
8889
center/var(--bg-gradient-size) no-repeat,
8990
/*header1*/ var(--bg-image-main-curves) top
@@ -92,9 +93,12 @@ const {
9293
no-repeat,
9394
/*base*/ var(--gray-999);
9495
background-blend-mode:
95-
/*noise*/ overlay,
96-
/*footer*/ var(--bg-blend-mode), /*header1*/ var(--bg-svg-blend-mode),
97-
/*header2*/ normal, /*base*/ normal;
96+
/*noise*/
97+
overlay,
98+
/*footer*/ var(--bg-blend-mode),
99+
/*header1*/ var(--bg-svg-blend-mode),
100+
/*header2*/ normal,
101+
/*base*/ normal;
98102
}
99103
@media (forced-colors: active) {
100104
/* Deactivate custom backgrounds for high contrast users. */

0 commit comments

Comments
 (0)