Skip to content

Commit

Permalink
fixed pixel ig?
Browse files Browse the repository at this point in the history
  • Loading branch information
RookieProgrammerSachin authored Sep 14, 2023
1 parent 07501c0 commit 375c291
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
19 changes: 9 additions & 10 deletions src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,15 @@ export default function App({ Component, pageProps }) {
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '${NEXT_PUBLIC_PIXEL_ID}');
fbq('track', 'PageView');
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', ${NEXT_PUBLIC_PIXEL_ID});
`,
}}
/>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Head, Html, Main, NextScript } from 'next/document'
import { Head, Html, Main, NextScript } from 'next/document';
import { NEXT_PUBLIC_PIXEL_ID } from "@/firebaseConfig";

export default function Document() {

Expand Down Expand Up @@ -96,7 +97,7 @@ export default function Document() {
height="1"
width="1"
style={{ display: 'none' }}
src={`https://www.facebook.com/tr?id=${process.env.NEXT_PUBLIC_PIXEL_ID}&ev=PageView&noscript=1`}
src={`https://www.facebook.com/tr?id=${NEXT_PUBLIC_PIXEL_ID}&ev=PageView&noscript=1`}
/>
</noscript>
</Head>
Expand Down
8 changes: 0 additions & 8 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ export default function Home() {
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link rel='icon' href='/logo.png' />
<title>Madrasda | Official merchandise | Indian content creators</title>
<noscript>
<img
height="1"
width="1"
style={{ display: 'none' }}
src={`https://www.facebook.com/tr?id=${NEXT_PUBLIC_PIXEL_ID}&ev=PageView&noscript=1`}
/>
</noscript>
</Head>
<Script
src='https://www.googletagmanager.com/gtag/js?id=G-P9LL7RBT1S'
Expand Down

0 comments on commit 375c291

Please sign in to comment.