};function runPageScript(){ (function () { // ========================= // The Furtado Group — Blog Index SEO Boost (Oakville + Burlington) // Fixes: query-parameter canonicals (e.g., ?fromCms=1) // Adds: canonical, OpenGraph/Twitter meta, and JSON-LD (CollectionPage) // ========================= var origin = window.location.origin; // Force canonical to the clean blog URL (strip query params) var canonicalUrl = origin + "/blog"; // 1) Canonical (UPSERT: replace if exists, else create) var existingCanonical = document.querySelector('link[rel="canonical"]'); if (existingCanonical) { existingCanonical.setAttribute("href", canonicalUrl); } else { var canonical = document.createElement("link"); canonical.rel = "canonical"; canonical.href = canonicalUrl; document.head.appendChild(canonical); } // Helper to upsert meta tags function upsertMeta(selector, attrs) { var el = document.querySelector(selector); if (!el) { el = document.createElement("meta"); document.head.appendChild(el); } Object.keys(attrs).forEach(function (k) { el.setAttribute(k, attrs[k]); }); } // 2) OpenGraph + Twitter var title = "Real Estate Blog | Oakville & Burlington | The Furtado Group"; var description = "Local Oakville and Burlington real estate insights from The Furtado Group—Top 1% in the GTA (TRREB, based on sales volume and transactions). Buying, selling, luxury homes, and market guidance."; upsertMeta('meta[property="og:type"]', { property: "og:type", content: "website" }); upsertMeta('meta[property="og:site_name"]', { property: "og:site_name", content: "The Furtado Group" }); upsertMeta('meta[property="og:title"]', { property: "og:title", content: title }); upsertMeta('meta[property="og:description"]', { property: "og:description", content: description }); upsertMeta('meta[property="og:url"]', { property: "og:url", content: canonicalUrl }); upsertMeta('meta[name="twitter:card"]', { name: "twitter:card", content: "summary_large_image" }); upsertMeta('meta[name="twitter:title"]', { name: "twitter:title", content: title }); upsertMeta('meta[name="twitter:description"]', { name: "twitter:description", content: description }); // 3) JSON-LD (CollectionPage for the blog index) var jsonLd = { "@context": "https://schema.org", "@graph": [ { "@type": "CollectionPage", "@id": canonicalUrl + "#collectionpage", "url": canonicalUrl, "name": title, "description": description, "isPartOf": { "@id": "https://www.thefurtadogroup.com/#website" }, "about": { "@id": "https://www.thefurtadogroup.com/#organization" }, "inLanguage": "en-CA", "areaServed": [ { "@type": "City", "name": "Oakville", "addressRegion": "ON", "addressCountry": "CA" }, { "@type": "City", "name": "Burlington", "addressRegion": "ON", "addressCountry": "CA" } ] } ] }; // Inject JSON-LD (avoid duplicates) if (!document.querySelector('script[data-tfg-blogindex-jsonld="true"]')) { var ld = document.createElement("script"); ld.type = "application/ld+json"; ld.setAttribute("data-tfg-blogindex-jsonld", "true"); ld.text = JSON.stringify(jsonLd); document.head.appendChild(ld); } })(); };