Skip to content

Commit

Permalink
ad scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
LakshayGMZ committed Jun 7, 2024
1 parent 5b175d3 commit f02b150
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions components/ui/CustomScripts.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
import Script from "next/script";

const CustomScripts = () => {
return (
<>
{/*===========GOOGLE ANALYTICS==============*/}
<Script
strategy='afterInteractive'
src={`https://www.googletagmanager.com/gtag/js?id=G-503VYT6TSX`}
/>
<Script
id='gtag-init'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: `
return (
<>
{/*===========GOOGLE ANALYTICS==============*/}
<Script
strategy="afterInteractive"
src={`https://www.googletagmanager.com/gtag/js?id=G-503VYT6TSX`}
/>
<Script
id="gtag-init"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-503VYT6TSX', {
page_path: window.location.pathname,
});
`,
}}
/>
}}
/>

{/*===========ADSENSE=============*/}
<meta name="google-adsense-account" content="ca-pub-3003249944965153"/>

</>
);
{/*===========ADSENSE=============*/}
<meta name="google-adsense-account" content="ca-pub-3768083860941636" />
<Script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3768083860941636"
crossorigin="anonymous"
></Script>
</>
);
};


export default CustomScripts;
export default CustomScripts;

0 comments on commit f02b150

Please sign in to comment.