Skip to content

Commit

Permalink
ga_id
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ authored Mar 23, 2024
1 parent 8208e73 commit d53efc0
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/app/layout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import "./globals.css";
import Script from "next/script";


export default function RootLayout({ children }) {
let ga_id = "G-CWL59Y4TR7";
return (
<html lang="en">
<head>
Expand All @@ -18,15 +21,32 @@ export default function RootLayout({ children }) {
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1828915420581549"
crossorigin="anonymous"
></script>
<script
{/* <script
async
src="https://www.googletagmanager.com/gtag/js?id=G-CWL59Y4TR7"
></script>
<script>
{`window.dataLayer = window.dataLayer || []; function gtag()
{dataLayer.push(arguments)}
gtag('js', new Date()); gtag('config', 'G-CWL59Y4TR7');`}
</script>
</script> */}
<Script
async
src={`https://www.googletagmanager.com/gtag/js?
id=${ga_id}`}
></Script>
<Script
id="google-analytics"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${ga_id}');
`,
}}
></Script>
<script
type="text/javascript"
src="https://platform-api.sharethis.com/js/sharethis.js#property=65fe7f28fb0d80001211056b&product=sop"
Expand Down

0 comments on commit d53efc0

Please sign in to comment.