Add facebook pixel

This commit is contained in:
ASOwnerYT
2025-08-25 10:21:08 +12:00
parent 67f0f71d62
commit eede38a7de
2 changed files with 823 additions and 447 deletions
+800 -440
View File
File diff suppressed because it is too large Load Diff
+23 -7
View File
@@ -1,13 +1,14 @@
import localFont from "next/font/local"; import localFont from "next/font/local";
import "./globals.css"; import "./globals.css";
import Navbar from "./components/Navbar" import Navbar from "./components/Navbar";
import Footer from "./components/Footer" import Footer from "./components/Footer";
import ChatwootWidget from "./components/ChatwootWidget" import ChatwootWidget from "./components/ChatwootWidget";
// Add spyware // Add spyware
import { Analytics } from "@vercel/analytics/react" import { Analytics } from "@vercel/analytics/react";
import { GoogleAnalytics } from '@next/third-parties/google' import { GoogleAnalytics } from "@next/third-parties/google";
import { SpeedInsights } from "@vercel/speed-insights/next" import { SpeedInsights } from "@vercel/speed-insights/next";
import Script from "next/script";
const geistSans = localFont({ const geistSans = localFont({
src: "./fonts/GeistVF.woff", src: "./fonts/GeistVF.woff",
@@ -22,7 +23,8 @@ const geistMono = localFont({
export const metadata = { export const metadata = {
title: "Te Atatu Computer Repair & Web Design", title: "Te Atatu Computer Repair & Web Design",
description: "Your Local Experts for PCs, Laptops, Web Design, IT Support & More.", description:
"Your Local Experts for PCs, Laptops, Web Design, IT Support & More.",
}; };
export default function RootLayout({ children }) { export default function RootLayout({ children }) {
@@ -36,6 +38,20 @@ export default function RootLayout({ children }) {
<Analytics /> <Analytics />
<SpeedInsights /> <SpeedInsights />
<GoogleAnalytics gaId="G-TN7ZL1Y4CC" /> <GoogleAnalytics gaId="G-TN7ZL1Y4CC" />
<Script id="facebook-pixel">
{`
!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', '1370044511045020');
fbq('track', 'PageView');
`}
</Script>
</body> </body>
</html> </html>
); );