rapharehap/app/layout.js
2025-10-29 15:34:32 +05:30

229 lines
7.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`;
const ogImage = `${siteUrl}/assets/images/logo.jpg`;
return (
<html lang="en" className={`${poppins.variable}`}>
<head>
{/* ✅ Preload critical font */}
<link
rel="preload"
href="/fonts/poppins.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
/>
{/* ✅ Canonical Tag */}
<link rel="canonical" href="https://rapharehab.ca/" />
{/* ✅ Open Graph Meta Tags */}
<meta
property="og:title"
content="Rapha Rehab Your Trusted Physiotherapy & Rehabilitation Clinic in Etobicoke"
/>
<meta
property="og:description"
content="Rapha Rehab provides evidence-based physiotherapy, sports injury rehab, massage therapy, chiropractic care, orthotics and more in Etobicoke. Regain mobility, reduce pain and live healthier."
/>
<meta property="og:type" content="website" />
<meta property="og:url" content={siteUrl} />
<meta property="og:site_name" content="Rapha Rehab" />
<meta property="og:image" content={ogImage} />
<meta
property="og:image:alt"
content="Rapha Rehab clinic interior physiotherapy treatment in progress"
/>
<meta property="og:locale" content="en_CA" />
{/* ✅ Twitter Card Meta Tags */}
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content="Rapha Rehab Physiotherapy & Rehabilitation Clinic in Etobicoke"
/>
<meta
name="twitter:description"
content="Experience expert physiotherapy, sports rehab, massage therapy, chiropractic care, and orthotics at Rapha Rehab in Etobicoke. Get personalized treatment to restore your strength and mobility."
/>
<meta name="twitter:image" content={ogImage} />
<meta
name="twitter:image:alt"
content="Physiotherapy session at Rapha Rehab Clinic, Etobicoke"
/>
<meta name="twitter:site" content="@YourTwitterHandle" />
<meta name="twitter:url" content={siteUrl} />
{/* 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>
);
}