A multi-clinic Alberta optometry group wanted to know which locations and which campaigns produce booked appointments. Its decade-old WordPress site could not answer. We rebuilt it code-first. The third-party booking domain had been erasing every appointment's origin, so we built measurement that works across it. In July 2026, the system recorded 460 completed bookings from new patients, each carrying source, campaign, and location. The practice now compares marketing performance clinic by clinic, and speed, click-through, and rankings held or improved through the migration.
The Challenge
The old WordPress site carried a decade of built-up technical debt, and it failed the practice in three distinct ways.
Performance dragged on the devices that matter. Mobile audits during discovery scored the old site around 70. They found recurring image-delivery and caching problems. Most "optometrist near me" traffic is mobile, and a slow site costs bookings before a patient reaches the contact page.
The search index was bloated with pages that never produced a patient. Search engines were crawling 126 URLs. A large share were aging blog posts on general eye trivia. Pages outside the site's commercial core drew roughly 44,000 impressions in March and April 2026 alone. They earned just 131 clicks, a click-through rate under 0.3%. That surplus content diluted the site's topical focus while the location pages and the specialty services fought for attention.
Measurement broke at the most important step. The practice books appointments through a third-party scheduling platform that runs on its own separate domain. Patients clicked through to book. Analytics treated the jump as a new, unrelated visit and lost the original ad, campaign, or organic search. The practice could see traffic and bookings. But it could not connect the two. The owner had asked specifically for year-over-year conversion reporting for each location. That was impossible on the old architecture.
Our Approach
We rebuilt the entire site code-first. It runs on Next.js with TypeScript, and content lives in the codebase as structured data and MDX. There is deliberately no content management system. That choice ends the WordPress plugin-security treadmill, raises the performance ceiling, and makes the site maintainable by AI agents. Structured, typed, documented code is something an agent can read and change with confidence. The full build is 46 pages. It covers home, a page for each location, 12 service pages, nearly 20 optometrist profiles, and booking, insurance, contact, and policy pages.
Every page was structured for local search. Location pages give search engines MedicalClinic and LocalBusiness structured data: accurate name-address-phone, hours, and live Google review ratings. FAQPage markup sits on each service page, and Physician markup on every provider profile. Signature specialty services route deliberately to the clinics best positioned to deliver and rank for them. The right location then competes for the right high-value search. The clinics' 4.8 to 4.9 star Google ratings, built on hundreds of reviews each, show right on the location cards.
Delivery is edge-first. The site sits behind a content delivery network (CDN) with an intentional caching policy. It caches static assets for a year, images for a week, and HTML for an hour, with API requests bypassed. Every deploy purges the cache automatically.
The hardest engineering went into measurement. We linked visits across both domains. The original source, medium, and campaign now travel with the patient instead of resetting at the handoff. We reworked the booking handoff itself as a genuine trackable click, because cross-domain linking silently ignores programmatic redirects. Our identity cookie is namespaced separately so the booking provider's own analytics stay completely untouched. Booking-funnel events flow into the practice's analytics property. Google Ads click IDs are captured when a patient lands and passed through to the booking URL. Everything runs through Google Tag Manager, so the marketing team can adjust tracking without a code deploy.
Accessibility and privacy were treated as first principles. That meant WCAG 2.2 Level AA across public pages and no web form that invites medical detail. Form contents never reach analytics. External systems handling personal health information are clearly disclosed. The contact form's disclosure satisfies Alberta PIPA without a consent banner.
The Results
The speed results hold up under scrutiny. On an emulated mobile device with network and CPU throttling, the rebuilt homepage paints its headline in 1.7 seconds. Cumulative layout shift is 0.08. The whole page weighs 746 KB across 34 requests, and server response time stays under 350 ms through the CDN. The weight includes analytics and tag manager. In the rebuild, the image-delivery and caching problems that dogged the old build are designed out rather than patched. The framework optimizes images natively. Caching is a declared policy at the edge instead of a plugin setting.
Search results show a deliberate trade of empty impressions for qualified clicks: sitewide organic click-through rose from 1.1% to 2.9%. Average position held around 9. At that rate, the site now earns roughly the same commercial clicks from a third of the impressions. Pages that book patients held or grew across the migration. Location pages averaged 17.2 organic clicks per day before cutover and 18.3 after. Optometrist profile clicks rose 67% per day. The rise came because patients search for doctors by name and nearly 20 structured, personal profile pages now answer them. Rankings crossed the migration intact. On both sides of cutover, 24 of 38 tracked commercial keywords sat in the top 10.
Attribution results answer the owner's original question. Since cutover, the booking funnel reports into the practice's own analytics across the booking provider's domain boundary. Website booking handoffs numbered 133 in the partial May window, 401 in June, and 436 in July. July brought 460 completed bookings from new patients. Phone-call clicks tracked since June total 370. New-patient completions can exceed website handoffs because the cross-domain layer also captures bookings that begin outside the site. Those include bookmarks and Google Business Profile links. With that layer, the practice sees the whole funnel, beyond the slice that started on its homepage.
The measurement layer also feeds the advertising forward: conversion values tell a specialty contact-lens fitting apart from a routine check. Five remarketing audiences are defined and mapped to campaign uses. Every event carries a location ID. With it, dashboards finally report conversions per clinic.
Two metrics are behaving the way metrics do after a site migration, and we are not declaring victory early. We monitor both daily. Specialty-service pages moved to new URLs. They are still winning back the rankings their old versions held. A volume-weighted visibility index that includes that long tail dipped during the migration window for the same reason. The tracked set of commercial keywords is stable. That is the leading indicator we care about. Service-page recovery is the trailing one. We report it honestly, per location, from the same measurement layer described above.
Read more about web design and development and local SEO for multi-location practices. Or see our optometry industry work. If your website can show you traffic but cannot show you booked appointments, talk to us.