Skip to content

Commit d1c585c

Browse files
committed
Site updated
- Added meta data
1 parent 6f8414b commit d1c585c

File tree

13 files changed

+80
-24
lines changed

13 files changed

+80
-24
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_GA_ID=G-DLP8GDY9C2
File renamed without changes.
File renamed without changes.

components/MetaHead.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import {NextPage} from "next";
2+
import Head from "next/head";
3+
import { GA_TRACKING_ID } from '../lib/gtag'
4+
5+
const MetaHead: NextPage = () => {
6+
return (
7+
<Head>
8+
<title>Saumya Shovan Roy</title>
9+
<link rel="icon" href="/image/favicon.ico" />
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0"/>
11+
<meta name="description" content="Saumya Shovan Roy Website"/>
12+
<meta name="author" content="Saumya Shovan Roy"/>
13+
<meta name="keywords" content="Software Engineer, Dev, Site, Boston, Massachusetts, USA, Startup, Java, Spring Boot, JPA, Hibernate, Junit, Mockito, gRPC, REST, RabbitMQ, NodeJS, Express, JavaScript, ES6, React, SQL, Elastic Search, ELK, NoSQL, MongoDB, Redis, NoSQL, Gitlab, CI/CD, Git, Docker, Helm, Bash, Maven, Npm, Kubernetes, OpenShift, AWS, GCP, Microk8s, Ngin"/>
14+
<meta property="og:title" content="Saumya Shovan Roy" />
15+
<meta property="og:description" content="Saumya Shovan Roy Website" />
16+
<meta property="og:url" content="https://saumyaroy.com/" />
17+
<meta property="og:type" content="website" />
18+
<meta property="og:image" content="/image/favicon.ico" />
19+
20+
{/* Global Site Tag (gtag.js) - Google Analytics */}
21+
<script
22+
async
23+
src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`}
24+
/>
25+
<script
26+
dangerouslySetInnerHTML={{
27+
__html: `
28+
window.dataLayer = window.dataLayer || [];
29+
function gtag(){dataLayer.push(arguments);}
30+
gtag('js', new Date());
31+
gtag('config', '${GA_TRACKING_ID}', {
32+
page_path: window.location.pathname,
33+
});
34+
`,
35+
}}
36+
/>
37+
</Head>
38+
)
39+
}
40+
41+
export default MetaHead
File renamed without changes.
File renamed without changes.

lib/gtag.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_ID
2+
3+
// https://developers.google.com/analytics/devguides/collection/gtagjs/pages
4+
export const pageview = (url) => {
5+
window.gtag('config', GA_TRACKING_ID, {
6+
page_path: url,
7+
})
8+
}
9+
10+
// https://developers.google.com/analytics/devguides/collection/gtagjs/events
11+
export const event = ({ action, category, label, value }) => {
12+
window.gtag('event', action, {
13+
event_category: category,
14+
event_label: label,
15+
value: value,
16+
})
17+
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"imagemin-mozjpeg": "^9.0.0",
2020
"imagemin-optipng": "^8.0.0",
2121
"imagemin-svgo": "^10.0.0",
22-
"next": "11.1.2",
22+
"next": "11",
2323
"next-image-loader": "^2.0.6",
2424
"next-images": "^1.8.1",
2525
"next-optimized-images": "^2.6.2",
26-
"react": "17.0.2",
27-
"react-dom": "17.0.2",
26+
"react": "^17.0.2",
27+
"react-dom": "^17.0.2",
2828
"react-icons": "^4.3.1",
2929
"react-wordcloud": "^1.2.7",
3030
"typewriter-effect": "^2.18.2",

pages/404.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {NextPage} from "next";
2+
3+
const NotFound : NextPage = () => {
4+
return(
5+
<div>Noting Here, Go back</div>
6+
)
7+
}
8+
9+
export default NotFound

pages/Components/Header.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)