rapharehap/app/layout.js
2025-10-28 10:27:08 +05:30

182 lines
5.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { poppins } from "@/lib/font";
import "@/node_modules/react-modal-video/css/modal-video.css";
import "../public/assets/css/bootstrap.css";
import "../public/assets/css/color.css";
import "../public/assets/css/style.css";
import "swiper/css";
import "swiper/css/pagination";
import "swiper/css/free-mode";
import Script from "next/script";
export const metadata = {
title: "Best Pain Relief & Physiotherapy - Repharehab Clinic",
description: "Best pain relief physiotherapy clinic",
};
export default function RootLayout({ children }) {
const siteUrl = "https://rapharehab.ca";
const logoUrl = `${siteUrl}/assets/images/logo.png`;
return (
<html lang="en" className={`${poppins.variable}`}>
{/* ✅ Canonical Tag */}
<link rel="canonical" href="https://rapharehab.ca/" />
<head>
{/* Microsoft Clarity */}
<Script id="clarity-script" strategy="afterInteractive">
{`
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/th7p0lr1ca";
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "th7p0lr1ca");
`}
</Script>
{/* Google Tag Manager */}
<Script id="gtm-init" strategy="afterInteractive">
{`
(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','G-KM1KJW539N');
`}
</Script>
{/* ✅ Facebook Meta Pixel */}
<Script id="facebook-pixel" strategy="afterInteractive">
{`
!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', '1133141855537200');
fbq('track', 'PageView');
`}
</Script>
{/* PhysiotherapyClinic Schema Markup */}
<Script
id="schema-physiotherapy"
type="application/ld+json"
strategy="afterInteractive"
>
{JSON.stringify({
"@context": "https://schema.org",
"@type": "PhysiotherapyClinic",
name: "Repharehab Clinic",
image: logoUrl,
"@id": siteUrl,
url: siteUrl,
telephone: "+16477223434",
priceRange: "$$",
medicalSpecialty: "PhysicalTherapy",
address: {
"@type": "PostalAddress",
streetAddress: "5 4335 Bloor Street West",
addressLocality: "Etobicoke",
addressRegion: "ON",
postalCode: "M9C 2A5",
addressCountry: "CA",
},
geo: {
"@type": "GeoCoordinates",
latitude: 43.6389,
longitude: -79.5716,
},
openingHoursSpecification: [
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Monday",
opens: "10:00",
closes: "20:00",
},
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Tuesday",
opens: "14:00",
closes: "19:00",
},
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Wednesday",
opens: "10:00",
closes: "20:00",
},
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Thursday",
opens: "10:00",
closes: "20:00",
},
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Friday",
opens: "10:00",
closes: "20:00",
},
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Saturday",
opens: "10:00",
closes: "19:00",
},
{
"@type": "OpeningHoursSpecification",
dayOfWeek: "Sunday",
opens: "00:00",
closes: "00:00",
closed: true,
},
],
sameAs: [
"https://www.facebook.com/ELRaphaRehabCenter/",
"https://www.instagram.com/elrapharehab/",
],
})}
</Script>
</head>
<body>
{/* GTM noscript fallback */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=G-KM1KJW539N"
height="0"
width="0"
style={{ display: "none", visibility: "hidden" }}
></iframe>
</noscript>
{/* ✅ Facebook Pixel noscript fallback */}
<noscript>
<img
height="1"
width="1"
style={{ display: "none" }}
src="https://www.facebook.com/tr?id=1133141855537200&ev=PageView&noscript=1"
alt="facebook pixel"
/>
</noscript>
{children}
</body>
</html>
);
}