Skip to content

Commit

Permalink
added analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
UtkarshJaiswal1406 committed Oct 23, 2024
1 parent 89cccf3 commit c82f46b
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@nextui-org/navbar": "^2.0.32",
"@nextui-org/react": "^2.4.1",
"@nextui-org/system": "^2.2.1",
"@vercel/analytics": "^1.3.1",
"axios": "^1.7.3",
"dotenv": "^16.4.5",
"ionicons": "^7.3.1",
Expand All @@ -44,4 +45,4 @@
"postcss": "^8",
"tailwindcss": "^3.3.0"
}
}
}
22 changes: 22 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Navbar from "@/components/Shared/Navbar/Navbar";
import Footer from "@/components/Shared/Footer/Footer";
import Scroll from "@/components/Shared/Scroll";
import Head from "next/head";
import { Analytics } from "@vercel/analytics/react"

function MyApp({ Component, pageProps }) {
return (
<>
<Analytics/>
<Head>
{/* Google Tag Manager */}
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TXXTQDRC');`
}}/>
{/* End Google Tag Manager */}
<title>GitHub Community SRM | Open Source | SRM Institute of Science & Technology</title>
<meta charSet="UTF-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
Expand Down Expand Up @@ -115,6 +127,16 @@ function MyApp({ Component, pageProps }) {
<Scroll />
</div>
<Footer />
{/* Google Tag Manager (noscript) */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-TXXTQDRC"
height="0"
width="0"
style={{ display: 'none', visibility: 'hidden' }}>
</iframe>
</noscript>
{/* End Google Tag Manager (noscript) */}
</>
);
}
Expand Down
22 changes: 22 additions & 0 deletions pages/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ import Head from "next/head";

function AboutUs() {
return (
<>
<div className="bg-bg_black text-white">
<Head>
{/* Google Tag Manager */}
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TXXTQDRC');`
}}/>
{/* End Google Tag Manager */}
<title>About Us | GitHub Community SRM</title>
<meta name="description" content="Discover GitHub Community SRM, a student-led group at SRMIST, promoting open-source collaboration. Join us to explore coding, innovation, and community-driven development." />
<meta name="keywords" content="GitHub, SRMIST, Open Source, Coding, GitHub Community SRM, Development, Collaboration, SRM Institute of Science and Technology, Tech Community SRM, Student Developers SRMIST, Open Source Projects SRM, Coding Club SRM" />
Expand Down Expand Up @@ -142,6 +153,17 @@ function AboutUs() {
}
`}</style>
</div>
{/* Google Tag Manager (noscript) */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-TXXTQDRC"
height="0"
width="0"
style={{ display: 'none', visibility: 'hidden' }}>
</iframe>
</noscript>
{/* End Google Tag Manager (noscript) */}
</>
);
}

Expand Down
20 changes: 20 additions & 0 deletions pages/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ const Contact = () => {
return (
<>
<Head>
{/* Google Tag Manager */}
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TXXTQDRC');`
}}/>
{/* End Google Tag Manager */}
<title>Contact Us | GitHub Community SRM | Support & Queries</title>
<meta name="description" content="Need help or have a query? Contact the GitHub Community SRM team for support and assistance. Explore our FAQ section for quick answers to common questions." />
<meta name="keywords" content="Contact, GitHub Community SRM, support, queries, FAQ, community help, reach out, open source support, SRMIST GitHub, GitHub Community support" />
Expand Down Expand Up @@ -50,6 +60,16 @@ const Contact = () => {
<Faq />
</div>
</div>
{/* Google Tag Manager (noscript) */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-TXXTQDRC"
height="0"
width="0"
style={{ display: 'none', visibility: 'hidden' }}>
</iframe>
</noscript>
{/* End Google Tag Manager (noscript) */}
</>
);
};
Expand Down
25 changes: 25 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ import Domains from "@/components/Home/Domains";
import Gallery from "@/components/Home/Gallery";
import Sponsors from "@/components/Home/Sponsors";
import ContactForm from "@/components/Contact/ContactForm";
import Head from "next/head";

const Index = () => {
return (
<>
<Head>
{/* Google Tag Manager */}
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TXXTQDRC');`
}}/>
{/* End Google Tag Manager */}
</Head>
<div className="bg-bg_black">
<Hero />
<AboutUs />
Expand All @@ -18,6 +32,17 @@ const Index = () => {
</div>
<ContactForm />
</div>
{/* Google Tag Manager (noscript) */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-TXXTQDRC"
height="0"
width="0"
style={{ display: 'none', visibility: 'hidden' }}>
</iframe>
</noscript>
{/* End Google Tag Manager (noscript) */}
</>
);
};

Expand Down
22 changes: 22 additions & 0 deletions pages/team.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,19 @@ const Teams = () => {
};

return (
<>
<section className="bg-bg_black">
<Head>
{/* Google Tag Manager */}
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TXXTQDRC');`
}}/>
{/* End Google Tag Manager */}
<title>Meet the Team | GitHub Community SRM | Technical, Corporate, Creative</title>
<meta name="description" content="Meet the GitHub Community SRM team, including President, Vice President, Leads, Associates, and Members from the Technical, Corporate, and Creative domains. Learn more about the talented individuals driving our open-source initiatives." />
<meta name="keywords" content={generateKeywords()} />
Expand Down Expand Up @@ -365,6 +376,17 @@ const Teams = () => {
</TransitionGroup>
</div>
</section>
{/* Google Tag Manager (noscript) */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-TXXTQDRC"
height="0"
width="0"
style={{ display: 'none', visibility: 'hidden' }}>
</iframe>
</noscript>
{/* End Google Tag Manager (noscript) */}
</>
);
};

Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3573,6 +3573,13 @@
dependencies:
"@types/webidl-conversions" "*"

"@vercel/analytics@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.3.1.tgz#e2b1deac1b5d14fa2e4fe36186ac5054c6385ae4"
integrity sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==
dependencies:
server-only "^0.0.1"

ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz"
Expand Down Expand Up @@ -4844,6 +4851,11 @@ semver@^7.6.3:
resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==

server-only@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e"
integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==

sharp@^0.33.5:
version "0.33.5"
resolved "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz"
Expand Down

0 comments on commit c82f46b

Please sign in to comment.